Java is Complete Object Oriented Language but not Pure.
for the Object Oriented Language(Pure) ,everything's must be in form of object.
but java supported primitive data types, static references,static method which can be called with the class name instead of object.
class MyJava
{
public static void go()
{
System.out.println("This method can be called without any references");
}
}
class my java has a method go();
we can call this method without the references of MyJava class.
class First
{
int a=10; //this work fine but a is not an object ,breaks pure oo .
String s="java string"; //it right for pure object oriented language's
public static void mai(String...s)
{
MyJava.go(); // This work fine in java ,breaks pure oo.
new MyJava.go(); //this work fine and also full the pure object oriented language rules
}
}
All these like primitives and statics are usefull for programming but it not full the requirements of Pure OO.
for the Object Oriented Language(Pure) ,everything's must be in form of object.
but java supported primitive data types, static references,static method which can be called with the class name instead of object.
class MyJava
{
public static void go()
{
System.out.println("This method can be called without any references");
}
}
class my java has a method go();
we can call this method without the references of MyJava class.
class First
{
int a=10; //this work fine but a is not an object ,breaks pure oo .
String s="java string"; //it right for pure object oriented language's
public static void mai(String...s)
{
MyJava.go(); // This work fine in java ,breaks pure oo.
new MyJava.go(); //this work fine and also full the pure object oriented language rules
}
}
All these like primitives and statics are usefull for programming but it not full the requirements of Pure OO.