Menu
Question Index
...

Define the classes A and B, such that the program compiles without any errors.



class DefineClasses
{
    public static void main(String s[])
    {
        A a = new A(34.2, true);
        a.llt(43);
        
        a.x += 3;
        
        B b = new B('A', 25);
        b.zs();
        b.k = 98;
        b.r_2++;
        
        a = b;
        a.k = 32;
        
        System.out.println("All compilation errors resolved");

    }



}

Doubts

Problems

Topic: Inheritance And Constructors 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