+ 6

What is a main difference between C++ and Java?

Give a suggestion

19th May 2019, 3:04 PM
Ashish Mewada
Ashish Mewada - avatar
8 Answers
+ 10
Please do the two tutorials to find out.
19th May 2019, 9:50 PM
Sonic
Sonic - avatar
+ 6
The difference between c++ and Java c++ is a procedural and object oriented programming language c++ is not compulsory a class and the language is platform dependent and Java is pure object oriented programming language and in Java class is compulsory without class not compile code and java is a platform independent language. The java language is follow "wora" statement write once run anytime..
19th May 2019, 3:27 PM
Vijendra Mewada
Vijendra Mewada - avatar
+ 6
The main difference is that JAVA is 99% object oriented programming language and C++ is partially object oriented programming language In java 1% exception is handled by Wrapper class. In C++ we can make programme without class and can follow top to bottom approach of procedure oriented programming language One more important difference is that in C++ their is compiler but in JAVA their are both compiler and interpreter .
19th May 2019, 4:09 PM
Aadarsh Gupta
Aadarsh Gupta - avatar
+ 5
         ·         C++ is mainly used for system programming. Java is mainly used for application programming. It is widely used in window, web-based, enterprise and mobile applications. ·         C++ supports multiple inheritance. Java doesn't support multiple inheritance through class. It can be achieved by interfaces in java. ·         C++ supports pointers. You can write pointer program in C++. Java supports pointer internally. But you can't write the pointer program in java. It means java has restricted pointer support in java.
20th May 2019, 6:09 AM
Jitendra Mewada
Jitendra Mewada - avatar
+ 3
Correct answer
20th May 2019, 7:13 AM
Ankit Mewada
Ankit Mewada - avatar
+ 2
1 java is cross platform but c++ isnt 2 java is full object oriented but c++ less then it 3 java more usage then c++
20th May 2019, 7:16 AM
Rahman Rezaie đŸ‡ŠđŸ‡«
Rahman Rezaie đŸ‡ŠđŸ‡« - avatar
+ 2
Main differences are that 1. Java is provides platform independancy by JVM and byte code, while C++ is not ensure for platform independancy 2. Pointer is used in C++ that violet private data security, while Java not allowed pointer. But, allow reference variable. So, provides reference and also maintain security. 3. C++ allows multiple inheritance which cause problem while have same functions in two different class that is base class for derived class, While Java eliminates multiple interitance and allow it to only by interface. So, not ambiguity is created. I hope it will be helpful for know difference between C++ and Java.
20th May 2019, 6:22 PM
Malhar Naiya
Malhar Naiya - avatar
+ 1
Hi! There are a lot of difference, but the mainly is: - Syntax - Java is platform independent; - Java pass primitive value by copy.
20th May 2019, 11:43 PM
Rafael S Valle
Rafael S Valle - avatar