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
What happens when I use / and % with a negative numerator?
Why put method is used?
Which collections are thread safe in java?
Which sorting is best in java?
5 Coding best practices you learned in java?
What are the types of collections in java?
What is application tier?
What are the important methods of java exception class?
What is a finally block?
What are serialization and deserialization?
hi am an engineering student and my next plan is for ms in either in us or australia i got my passport but i dont know anything bout visa can u give brief idea 1)How to get prepared for visa and 2)How to apply for top universities and 3)How to pay the fee and so on These all are basic questions plz give me a clear idea
What is a programming object?
What is structure of java heap? What is perm gen space in heap?
What does this () mean in constructor chaining concept?
What is integer valueof?