I have a Java Package exec. It has two classes in it A and B.
In A class, I'm trying to access a static function of B. Now, Eclipse throws an error that "B cannot be resolved"
Again, the same error comes when I try to access a function of B from ObjB(An Object of B).
Is there anything that I should try to fix in Eclipse?
package exec;
public class A{
public static void main(){
B.fun1();
//Error thrown here
B Objb = new B();
Objb.fun2();
//And here
}
}
And, this is the Class B
package exec;
public class B{
public static void fun1(){
}
public void fun2(){
}
}