Multiple Inheritance in java program
import java.util.*;
import java.io.*;
class c1
{
int length=20;
void ln()
{
System.out.print(length);
}
}
interface intf
{
int breadth=40;
void br();
}
public class c3 extends c1 implements intf
{
public static void main(String[] args)
{
c3 c= new c3();
c.ln();
c.br();
}
public void br()
{
System.out.print(breadth);
}
}
Leave a Reply