✅ 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);}}
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!