class
Test {
static void show()
{
System.out.println("Show method in Test class");
}
}
public class OverTest extends Test
{
static void show()
{
System.out.println("Show method in OverTest class");
}
public static void main(
String[] args)
{
Test t = new OverTest();
t.show();
}
}
It gives the answer as "Show method in Test class", whereas I expected "Show method in OverTest class".
Can anyone explain?
Thanks
kanchan