Posts

JAVA QUESTIONS

Image
Happy reading...😊 1.What are the differences between C++ and Java? Which one do you think is better and why? Ans: Both are based on OOPS concept. Following are the basic differences – JAVA C++ You can write the code and run it anywhere. Java is platform-independent. Platform dependent language Used for application programming, like mobile and web-based applications. Used for system programming, for example OS are written in C++. Can pass variables only by the value Supports both pass by value and pass by reference Java uses pointers internally. Developers can’t write programs i.e. there is restricted support for pointers Developers can explicitly write code for   pointers. No support for operator overloading Supports operator overloading Doesn’t support multiple inheritances. (can be   achieved through an interface) Supports multiple inheritances When asked your opinion on which is better, there is no right or wrong answer. Yo