Preview:
abstract class A 
{ 
int a=17,b=46; 
void m2() 
{ 
System.out.println("sum="+(a+b)); 
} 
} 
class B extends A 
{ 
void m1() 
{ 
System.out.println("sub="+(b-a)); 
} 
public static void main (String args[]) 
{ 
B x=new B(); 
x.m2(); 
x.m1(); 
} }
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