Click here to Skip to main content
15,936,709 members
Please Sign up or sign in to vote.
2.33/5 (3 votes)
See more:
Is java completly object-oriented?
Posted

Java is purely object oriented.I can explain that with a comparison between a java code and a C++ code.C++ is not purely object oriented.
Partially object oriented means the code works with out a "class" in the code.You can use classes but its not a must.eg. C++ codes

C#
#include<iostream.h>;
#include<conio.h>;
void main()
{//No class definitions in this C++ code but it will run.
cout&lt;&lt;&quot;hello&quot;;
getch();
}</conio.h></iostream.h>



But purely object oriented means with out a class definition the program wont run.eg.Java code

SQL
Public class techarena{ /*class defintion is a must and the file should me named
public classname with .java extension.in this eg. &quot;techarena.java&quot; */
public static void main(String args[])
{
System.out.println(&quot;hello&quot;);
}
}
 
Share this answer
 
v3
Comments
Tarun.K.S 3-Jun-11 7:26am    
I think you are right. 5+
Java supports primitive Datatypes like float, int, char so we can't call it 'completly' object oriented. Yes but this doesn't matters as need primitive types can't be eliminated.
 
Share this answer
 
We can't say java is a completely object oriented language because it has primitive datatypes that's why we use Wrapper classes.

C# is completely object oriented language.
 
Share this answer
 
The question is purely casuistic and has nothing to do with real OOP or other technological knowledge.
There is not such commonly-used notion of "completely object-oriented". Discussing over this question is just a waste of time.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900