I am preparing for
SCJP and i have the following doubt.
Consider the following code :
public class
Test {
public static void main(
String [] args)
{
SuperTest st = new SubTest();
st.testMethod(10);
}
}
class SuperTest
{
public void testMethod(int a)
{
System.out.println("\n Test Method in Super Test Class ");
}
}
class SubTest extends SuperTest
{
public void testMethod(final int a)
{
System.out.println("\n Test Method in SubTest Class ");
}
}
Whether the testMethod in SuperTest is overloaded or overriden in SubTest ?