+ 2
CPP and java both are OOP but for running a simple program why we need to define a class in java but not in cpp?
5 ответов
+ 2
C++ is a procedural language like C but it also has the possibility of object-oriented programming. So it needs the main function for program running. Java is pure OOP and it needs class.
+ 5
Java creators decided that everything must be within a class. C++ started with the C language and added OOP to it as such it maintained backward compatibility with C so those programs could easily be ported.
+ 2
Michał Biernacki & Yadab Sutradhar Java is not a complete OOP language. Primitive types like int, boolean, etc still exist in Java.
https://stackoverflow.com/questions/974583/is-java-100-object-oriented
0
java is fully oop but c++ is not fully.
0
java is able to wrap that primitive data types and use as a object by some wrapping classes. it act oop without any doubt. you should follow books of some experts.