class A
{
int a; String b;
void input()
{
System.out.println("enter your roll no and name ");
}
}
class B extends A
{
void D()
{
a=10; b="om";
System.out.println(a+" "+b);
}
public static void main(String[] args){
B r=new B();
r.input();
r.D();
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter