Preview:
interface A 
{ 
int a=50;
} 
interface B 
{ 
int b=40;
} 
class Task20 implements A,B 
{ 
void stmt() 
{ 
System.out.println("I have Rights on both A & B");
} 
public static void main(String[] args) 
{ 
Task20 x=new Task20();
x.stmt();
System.out.println("Addition is :"+(a+b));
} 
}
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