logo

Crowdly

What is the output of the following program? class SolarSystem { } class E...

✅ 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 program?

class SolarSystem {

}

class Earth extends SolarSystem {

}

class Mars extends SolarSystem {

}

public class Moon extends Earth {

public static void main(String args[])

{

SolarSystem s = new SolarSystem();

Earth e = new Earth();

Mars m = new Mars();

System.out.println(s instanceof SolarSystem);

System.out.println(e instanceof Earth);

System.out.println(m instanceof SolarSystem);

}

}

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!