Question: Look at the following class: public class CheckPoint { public void message(int x) { System.out.print(This is the first version ); System.out.println(of the method.); } public
Look at the following class:
public class CheckPoint
{
public void message(int x)
{
System.out.print("This is the first version ");
System.out.println("of the method.");
}
public void message(String x)
{
System.out.print("This is the second version ");
System.out.println("of the method.");
}
}
What will the following code display?
CheckPoint cp = new CheckPoint();
Cp.message("1");
Cp.message(1);
Step by Step Solution
3.45 Rating (165 Votes )
There are 3 Steps involved in it
This code will display This is the second version of the method follow... View full answer
Get step-by-step solutions from verified subject matter experts
