What is the difference between C++ & Java?

Answers were Sorted based on User's Feedback



What is the difference between C++ & Java?..

Answer / tiwari suryaprakash

you can call any method by using the reference of others
class object is known as DMD(Dynamic Method Dispatch)

Is This Answer Correct ?    4 Yes 0 No

What is the difference between C++ & Java?..

Answer / manish kumar

1- java does not support operator overloading.
2- does not support template.
3- not support global variable.
4- there are no header file in java.
5- java does not use pointer.
6- does not support multiple inheritance.

general answer for interview.

Is This Answer Correct ?    4 Yes 0 No

What is the difference between C++ & Java?..

Answer / mamta

java is automatic garbage collector where in c++ we have to use destructor to deallocate the memory.

Is This Answer Correct ?    4 Yes 0 No

What is the difference between C++ & Java?..

Answer / nagaraju

the main difference between c++ and java is, c++ don't have
any automatic memory deallocation. where as java have
automatic deallocation of memory

Is This Answer Correct ?    4 Yes 0 No

What is the difference between C++ & Java?..

Answer / amit shingavi

1)C++ allow the concept of Multiplie Inheritance whereas
Java don't allow it.
2)C++ is not purely Object Oriented but Java is Purely
Object Oriented.
3)Java is more secured than C++.

Is This Answer Correct ?    4 Yes 0 No

What is the difference between C++ & Java?..

Answer / ashish saran

There are many differences between C++ and Java, but they are all having some kind of substitute for that in one another. for eg, Java is missing pointers but there are collections framework in Java for implementing data structures.Java is missing multiple inheritance but has interfaces for that.

The architecture of both languages differ. In C++ header files are used, while the whole architecture of Java depends on Classes(there are also advantages to that).

However the main differences are of Multi-Threading and Platform Independence which are only in Java. Also it is more Programmer friendly.

Is This Answer Correct ?    4 Yes 0 No

What is the difference between C++ & Java?..

Answer / sandeep kumar

C++ is partial object oriented programming language because
without using a class we can write a program.

java is a complete object oriented programming language
because we cannot create even a single program without
writing class


c++ support got statement.

java does not support got statement.

Is This Answer Correct ?    4 Yes 0 No

What is the difference between C++ & Java?..

Answer / afreen

Differences between c++ and java are as follows:-
..c++ has header file #include<iostream.h> whereas java has import java.io.*;
..c++ uses clrscr() and getch(), java do not.
..c++ supports destructor, whereas java do not.
..complilation and running program differs in c++ and java.
..java is platform independent and machine independent, whereas c++ is not.
..In c++,the entire program is written in one class itself whereas java can have multiple classes.

Is This Answer Correct ?    4 Yes 0 No

What is the difference between C++ & Java?..

Answer / gurpreet singh

1.C++ supports pointers whereas Java does not pointers. But
when many programmers questioned how you can work without
pointers, the promoters began saying "Restricted pointers.”
So we can say java supports Restricted pointers.

2.At compilation time Java Source code converts into byte
code .The interpreter execute this byte code at run time
and gives output .Java is interpreted for the most part and
hence platform independent. C++ run and compile using
compiler which converts source code into machine level
languages so c++ is plate from dependents



3.Java is platform independent language but c++ is depends
upon operating system machine etc.



4.Java uses compiler and interpreter both and in c++ their
is only compiler
5.C++ supports operator overloading multiple inheritance but
java does not.



6.C++ is more nearer to hardware then Java

7.Everything is an object in Java (Single root hierarchy as
everything gets derived from java.lang.Object).



8.Java does is a similar to C++ but not have all the
complicated aspects of C++ (ex: Pointers, templates, unions,
operator overloading, structures etc..)

>>Java does not support conditional compile (#ifdef/#ifndef
type).

9.Thread support is built-in Java but not in C++.

10.Internet support is built-in Java but not in C++.

11.Java does not support header file, include library files
just like C++ .Java use import to include different Classes
and methods.



12.Java does not support default arguments like C++.

13.There is no scope resolution operator β€œ:: β€œin Java.

14.There is no "goto " statement in Java.

15.Exception and Auto Garbage Collector handling in Java is
different because there are no destructors into Java.

16.Java has method overloading, but no operator overloading
just like c++.



17.The String class does use the + and += operators to
concatenate strings and String expressions use automatic
type conversion,



18.Java support call by value only.


19.Java does not support unsigned integer.

Is This Answer Correct ?    4 Yes 0 No

What is the difference between C++ & Java?..

Answer / alka

In C++ header files are used, but in Java there is use of
headers files.

Is This Answer Correct ?    23 Yes 20 No

Post New Answer

More Core Java Interview Questions

What is classname class in java?

0 Answers  


program to find 25 square = 625 here the 625 of last two digits is equal to 25, i don't know excatly what this type of number is called

1 Answers   Huawei,


What is yield () in java?

0 Answers  


How can we handle runtime exceptions? write one sample program? Can we write runtime exceptions beside the throws key word? if yes write sample program?

1 Answers   Huawei,


What is json parser in java?

0 Answers  






What is default constructors?

0 Answers  


INTERVIEW QUESTION FOR ANDROID

0 Answers  


What are variable arguments or varargs?

0 Answers  


What is pass by value?

0 Answers  


Differences between C and Java?

0 Answers   TCS,


Differece between class and generic class?

0 Answers   Tech Mahindra,


Give some features of interface?

0 Answers  


Categories