Find the output of the following program code.
class parent
{
final int a=10;
void meth()
{
System.out.println(parent);
}
}
class Test1 extends parent
{ int a=20;
public static void main(String[] args)
{
parent par = new parent(); parent par2 = new Test1(); par.meth(); par2.meth(); System.out.println(par.a); System.out.println(par2.a); } void meth() { System.out.println(child);
}
}
Reveal answer
Fill a bubble to check yourself