So the basic difference b/w c++ and java is that in c++ class is not necessary and ends with;, main func is outside the calss | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

So the basic difference b/w c++ and java is that in c++ class is not necessary and ends with;, main func is outside the calss

11th Apr 2018, 8:41 AM
Vaishali Tiwari
Vaishali Tiwari - avatar
2 Antworten
+ 4
In other words, a Java program has to be, a class. C++, on the other hand, is a hybrid language, which allows programmers to write imperative programs instead of object-oriented programs.
11th Apr 2018, 8:50 AM
Hatsy Rei
Hatsy Rei - avatar
+ 1
There are most difference between they.... 1) C++ not force OOP programming like Java 2) All types in Java (but natives) are passed by reference. In C++ you can choose between by value and by reference 3) In C++ you dont have a garbage collector and yiu are responsable of memory deallocations... This is not true in java (there are few exception but for commons case this apply) 4) C++ not force polymophism and allow multiple inheritance (and all problem in use it)... Java force polymorphism and allow you of inherit by one only base class (though you can implement multiple interfaces in class) There are other differences but you can use google for get they
11th Apr 2018, 9:10 AM
KrOW
KrOW - avatar