logo

Crowdly

Dany jest kod: class X { } class A extends X { } class B extends X { } public ...

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

Dany jest kod:

class X {

}

class A extends X {

}

class B extends X {

}

public class SomeClass {

public static void main(String[] args) {

X objx = new A();

B objb = new B();

System.out.println(objb instanceof B); // linia 1

System.out.println(objx instanceof X); // linia 2

System.out.println(objb.getClass()); // linia 3

System.out.println(objx.getClass()); // linia 4

}

}

More questions like this

Want instant access to all verified answers on leon.pw.edu.pl?

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