Menu
Question Index
...

Define the required classes such that the program compiles without any errors.



class DefineClassHierarchy
{
    public static void main(String s[])
    {
        C c = new C();
        M m = new M();
        K k;
        O o = new C();
        H h = new H();
        k = o;
        m = h;
        c = m;
        
        System.out.println("All compilation errors resolved");

    }



}

Doubts

Problems

Topic: Is-A Relationship In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App