What are the differences between C++ and Java

Showing Answers 1 - 42 of 42 Answers

gopalakrishnan.t

  • Jun 7th, 2005
 

Both apply OOPS. but java adopts byte code convertion whereas c++ does not

  Was this answer useful?  Yes

n aresh

  • Jun 9th, 2005
 

c++ supports destructors whereas java doesn't support

  Was this answer useful?  Yes

satyendra chaudhary

  • Jul 30th, 2005
 

c++ uses pointers but java don't.....so more secure....

  Was this answer useful?  Yes

Amit Gohil

  • Aug 5th, 2005
 

Multiple inheritance can be possible in c++ but not possible in java

  Was this answer useful?  Yes

Sisodiya Pramod

  • Aug 16th, 2005
 

java is pure object oriented language whereas c++ not. java is not invented to replace c++ it's invented to solve other kind of problems related to network there r lot of difference in both, consider through any book.

  Was this answer useful?  Yes

Pavan

  • Sep 2nd, 2005
 

Through Java we can develop distributed / Internet based applications, whereas it is not possible with C++. 
In Java main() method will be inside the class whereas in C++ it is outside the class.

manoj pundhir

  • Sep 28th, 2005
 

pointer concept is not present in java but in the c++ pointer is there. main is present in class in java but in c++ main is out side from class.  

  Was this answer useful?  Yes

sarat

  • Sep 29th, 2005
 

hi

the main difference between c++,java is c++ is a semi object oriented programing language where as the java is fully object oriented language,java is platform independent also,then java memory allocatin and deallocation is easy,garbage collection is one of the features,a rich set of collection api

  Was this answer useful?  Yes

Kang Wang

  • Oct 12th, 2005
 

C++ has templates but Java doesn't;C++ can pass by value(default) or by reference whereas Java can only pass by reference (well, except primitives);C++ supports multiple inheritance but Java doesn't (although multiple interfaces);C++ requires memory management and Java provides garbage collection;C++ has pointers and Java doesn't;C++ is system dependent and Java is system independent

jemi

  • Apr 5th, 2006
 

Multiple inherence is also possible in java through Interface.

vinayagamoorthy

  • Aug 14th, 2006
 

How you say java is more secure without pointers? Without pointers,java is not difficult to learn.I jst need how it is secure?

  Was this answer useful?  Yes

Riyaz.A.Khan

  • Oct 27th, 2006
 

java allows multithreading, automatic garbage collection but this is not the case of C++. And also Java has no header files

  Was this answer useful?  Yes

AEROll

  • Jun 30th, 2007
 

Java interprets codes, codes written in Java are portable between platforms, but C++ compiles codes, codes written in C++ are MUCH faster.

  Was this answer useful?  Yes

Mukul

  • Sep 3rd, 2007
 

Hey java uses pointers but don't gives authority to create and change any pointer within java.java uses implicit pionter.All the objects in java have pointer as a reference internally.

  Was this answer useful?  Yes

paul.anuj

  • Sep 29th, 2008
 

c++ supports structures,union and enum concept whereas java doesn't.
c++ uses compiler, java uses interpreter.
C++ is plateform dependent, java is plateform independent.
c++ uses preprocessor directive. java do not use preprocessor hence no need to  include header files and no concept of macros.

  Was this answer useful?  Yes

bhaumiklitu

  • Sep 30th, 2008
 

1 - Java does not support operator overloading
2 - Java does not take template
3 -
It does not support multiple inheritance, however in internet it users multiple inheritance
4 -
Java does not support global variable
5 - Destructor are not used in Java

Where all these 5 statement are possible in C++

  Was this answer useful?  Yes

Since Java does not have a preprocessor there is no concept of #define macros or manifest constants. However, the declaration of named constants is supported in Java through use of the final keyword

  Was this answer useful?  Yes

Even though both C++ and Java are object oriented programming language, C++
is not platform independent, whereas Java is platform independent. C++ will not
support string data type directly (we have to give array of characters) , but in
Java there is one class called String. It will support data type. C++ will
support multiple inheritance, but in Java multiple inheritance cannot be
supported in order to avoid duplication

  Was this answer useful?  Yes

kabir soni

  • Feb 6th, 2009
 

1. Multiple Inheritance is also possible in Java through Interface.
2. The first argument in C++ command line argument is the name of the file while in Java its any type OS input

  Was this answer useful?  Yes