Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
369 B
1
Indexable
Never
class A
{
int i;
int j;
A(int m,int n)
{
i=m;
j=n;
}
}
class B extends A
{
int k;
B(int m,int n,int r)
{
super(m,n);
k=r;
}
void display()
{
System.out.println("The value of i and j are "+i+" "+j);
System.out.println("The value of k is "+k);
}
}
class Sample40
{
public static void main(String arg[])
{
B b= new B(3,4,5);
b.display();
}
}