//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class M
{
}
class N
{
}
class O extends M, N
{
}
17. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class P
{
}
class Q extends P
{
}
class R extends Q
{
}
class S extends R
{
}
18. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
interface A
{
}
class B
{
}
class C implements A extends B
{
}
19. Program
//Find what it gives Compiletion Error / Compiletion Successfully / Output ?
class U
{
void test1()
{
System.out.println("From test1");
}
}
interface V
{
void test2();
}
class W extends U implements V
{
public void test2()
{
System.out.println("From test2");
}
public static void main(String[] args)
{
W w1 = new W();
w1.test1();
w1.test2();
System.out.println("Done");
}
}
20. Program
//Find the O/P ?
interface X
{
void test1();
}
interface Y
{
void test2();
}
class Z
{
void test3()
{
System.out.println("From test3");
}
}
class Z1 extends Z implements X, Y
{
public void test1()
{
System.out.println("From test1");
}
public void test2()
{
System.out.println("From test2");
}
public static void main(String [] Args)
{
Z1 z = new Z1();
z.test1();
z.test2();
z.test3();
System.out.println("done");
}
}