logo

Crowdly

Browser

Add to Chrome

Given :  class A {     A() {         display();     }     void display() {      ...

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

Given : 

class A {

    A() {

        display();

    }

    void display() {

        System.out.println("A");

    }

}

class B extends A {

    int value = 10;

    void display() {

        System.out.println(value);

    }

}

What will be printed when this is executed?

public class Test {

    public static void main(String[] args) {

        A obj = new B();

    }

}

0%
19%
0%
81%
More questions like this

Want instant access to all verified answers on learning.devinci.fr?

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

Browser

Add to Chrome