Java 20 -multiple Inheritance with Inteference

PHOTO EMBED

Sun Nov 26 2023 17:07:15 GMT+0000 (Coordinated Universal Time)

Saved by @Java

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));
} 
}
content_copyCOPY