// Find what it gives Compiletion Error / Compiletion Successfully / Output ?
abstract class U
{
U()
{
System.out.println("U()");
}
void test1()
{
System.out.println("method");
}
abstract void test2();
}
10. Program
// Find what it gives Compiletion Error / Compiletion Successfully / Output ?
abstract class V
{
V()
{
System.out.println("v()");
}
}
class W extends V
{
W()
{
System.out.println("W()");
}
public static void main(String[] args)
{
W w1 = new W();
System.out.println("----");
}
}
11. Program
// Find what it gives Compiletion Error / Compiletion Successfully / Output ?
abstract class X
{
X(int i)
{
System.out.println("X(int)");
}
abstract void test1();
}
abstract class Y extends X
{
Y()
{
super(90);
System.out.println("Y()");
}
}
class Z extends Y
{
Z()
{
System.out.println("Z()");
}
void test1()
{
System.out.println("From test1");
}
public static void main(String[] args)
{
Z z1 = new Z();
System.out.println("----");
z1.test1();
}
}