Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Java is also not pure object-oriented like c++

If we can make a program without making an object using the static keyword with void main so we can say java is an object-oriented programming language. 


1 Answer
Pythonista

the main() method in Java code is itself inside a class. The static keyword lets the main() method which is the entry point of execution without making an object but you need to write a class. In C++, main() is outside the class and writing class it self is not mandatory. Hence, C++ is not a pure object oriented language bu Java is a completely object oriented language.

Advertisements

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.