Discussion Forum

How is Java different from C++?

How is Java different from C++?

by Prakash Joshi -
Number of replies: 1

How is Java different from C++?

In reply to Prakash Joshi

Re: How is Java different from C++?

by Dr. Jeetendra Pande -


  • C++ is only a compiled language, whereas Java is compiled as well as an interpreted language.
  • Java programs are machine-independent whereas a c++ program can run only in the machine in which it is compiled.
  • C++ allows users to use pointers in the program. Whereas java doesn’t allow it. Java internally uses pointers.
  • C++ supports the concept of Multiple inheritances whereas Java doesn't support this. And it is due to avoiding the complexity of name ambiguity that causes the diamond problem.