logo

Crowdly

Browser

Add to Chrome

What will be the output of the following code? class A {     void method() ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What will be the output of the following

code?

class A {

   

void method() {

       

System.out.println("Class A");

    }

}

class B extends A {

   

void method() {

       

super.method();

       

System.out.println("Class B");

    }

}

public class Main {

   

public static void main(String[] args) {

       

B obj = new B();

       

obj.method();

    }

}

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on my.uopeople.edu?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome