now check it my compiler still giving 4 errors. 2 errors are about " cant resolve symbol ob ". 1 error is " class MI should be declared abstract because it doesnot define meth2() ". and one is about " illegal start of expression at line " public void meth1(){ System.out.println("Method of A and a is:" + a);} "
interface A{
void meth1();
int a=5;
}
interface B{
void meth2();
int b=9;
}
class MI implements A,B{
public static void main(String args[]){
public void meth1(){ System.out.println("Method of A and a is:" + a);}
public void meth2(){ System.out.println("Method of B and b is:" + b);}
MI ob=new MI();
ob.meth1();
ob.meth2();
}
}
now isnt it like
