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 type of questions asked for barclays technologies pune please send urgent
Explain OOPs concept.
How to display arraylist values in java?
What is bufferedwriter?
Can classes declared using the abstract keyword cab be instantiated?
What are predefined functions?
Explain what is encapsulation?
Tell me a few examples of final classes defined in Java API?
What is multi-catch block in java?
Which api is provided by java for operations on set of objects?
Why we do exception handling in java and how many types of exceptions are there?
What does singleton class mean?
What is the difference between interface & abstract class?
what is thread? What are the high-level thread states? : Java thread
Difference between object and reference?