Look at the code below, analyze it and find out the output.
package puzzles;
public class Ov {
public void start()
{
System.out.println("Test");
}
}
package puzzles;
public class Puzzle1 extends Ov {
public void start()
{
System.out.println("TestB");
}
public static void main(String [] args)
{
((Ov)new
Puzzle1()).start();
}
}
Output:
TestB
No comments:
Post a Comment