Why java is not a pure object oriented language?

Answer Posted / java&

public class Main {


public static void main(String[] args) {

new A().path1.fun6();
new A().path2.fun4();
new F().path1.fun1();
new I.C().path1.path2.path2.path2.fun4();
}

}
class A extends F
{
void fun1()
{
System.out.print("Class A");
}
}

class B extends A
{
void fun2()
{
System.out.print("Class B");
}
}

interface I
{
C path1=new C();
class C extends B
{

void fun3()
{
System.out.print("Interface I");
}
}

}

interface J
{
D path2=new D();
class D extends B
{

void fun4()
{
System.out.print("Interface J");
}
}

}
class E implements I,J
{
void fun5()
{
System.out.print("Interface J");
}
}
class F extends E
{
void fun6()
{
System.out.println(" class F");
}
}



/* What is this? */

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between heap and stack memory?

865


What is fail first in java?

811


Is zero a positive integer?

760


What is the string function?

734


What is a jit compiler?

844


What is the SimpleTimeZone class?

1997


Why string is called as immutable?

702


How to sort list of list in java?

862


What is a priority queue java?

704


What is the difference between the paint() and repaint() methods?

787


How do you square a number?

851


what is meant by Garbage collection?

816


How does map works in java?

727


What super () does in java?

659


Why is stringbuffer faster than string?

677