this is the code
/*Inter.java*/
interface Inter{
void disp();
}
/*B.java*/
class A implements Inter{
public void disp(){
System.out.println("This is working ???");
}
}
public class B {
public static void main(
String args[]){
Inter obj = new A();
obj.disp();
}
}
on compiling it gives this error :
C:\examples\inter\B.java:1: cannot resolve symbol
symbol : class Inter
location: class A
class A implements Inter{
^
C:\examples\inter\B.java:9: cannot resolve symbol
symbol : class Inter
location: class B
Inter obj = new A();
^
2 errors
But if i put the interface i the file B.java it works..
plz tell me ??? what to do ??