logo

Crowdly

Browser

Add to Chrome

What is the output of the following code? interface A { int var = 2; } cla...

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

What is the output of the following code?

interface A

{

int var = 2;

}

class B implements A

{

void show()

{

var = 3;

System.out.println("var = "+var);

}

}

public class Main {

public static void main(String[] args) {

B obj = new B();

obj.show();

}

}

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

Want instant access to all verified answers on moodle.medtech.tn?

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

Browser

Add to Chrome