Look at the following classes: Public class Ground { Public Ground() { System.out.println(You are on the ground.);
Question:
Look at the following classes:
Public class Ground
{
Public Ground()
{
System.out.println("You are on the ground.");
}
Public Ground(String groundColor)
{
System.out.println("The ground is " +
GroundColor);
}
}
Public class Sky extends Ground
{
Public Sky()
{
System.out.println("You are in the sky.");
}
Public Sky(String skyColor)
{
Super("green");
System.out.println("The sky is " + skyColor);
}
}
What will the following program display?
Public class Checkpoint
{
Public static void main(String[] args)
{
Sky object = new Sky("blue");
}
}
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Starting Out With Java From Control Structures Through Data Structures
ISBN: 9780133957051
6th Edition
Authors: Tony Gaddis
Question Posted: