interface A
{
void test1();
}
interface B
{
void test2();
}
class C implements A, B
{
public void test1()
{
System.out.println("test1");
}
public void test2()
{
System.out.println("test2");
}
public static void main(String[] args)
{
C c1 = new C();
c1.test1();
c1.test2();
System.out.println("Done");
}
}
14. Program
//Find the O/P ?
interface H
{
void test1();
}
interface I
{
void test2();
}
interface F
{
void test3();
}
class G implements H, F, I
{
public void test1()
{
System.out.println("test1");
}
public void test2()
{
System.out.println("test2");
}
public void test3()
{
System.out.println("test3");
}
public static void main(String[] args)
{
G g1 = new G();
g1.test1();
g1.test2();
g1.test2();
System.out.println("Done");
}
}
15. Program
//Find the O/P ?
interface H
{
void test1();
}
interface I
{
void test2();
}
interface J
{
void test3();
}
abstract class K implements H, I, J
{
public void test2()
{
System.out.println("test2");
}
}
class L extends K
{
public void test1()
{
System.out.println("test1");
}
public void test3()
{
System.out.println("test3");
}
public static void main(String[] args)
{
L l1 = new L();
l1.test1();
l1.test2();
l1.test3();
System.out.println("Done");
}
}