class A
{
int a; int b; int c;
void ADD()
{
a=1;
b=2;
c=a+b;
System.out.println("addition of number "+c );
}
void SUB()
{
a=1;
b=2;
c=a-b;
System.out.println("subtraction of number "+c );
}
}
class B extends A
{
void MULTI()
{
a=1;
b=2;
c=a*b;
System.out.println("multiplication of number "+c );
}
}
class C extends B
{
void REMAINDER()
{
a=1;
b=2;
c=a%b;
System.out.println("remainder of number "+c );
}
}
class D{
public static void main(String[] args)
{
C r = new C();
r.ADD();
r.SUB();
r.MULTI();
r.REMAINDER();
}
}
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