Hello All,
I have an issue. I created 2 java programs, a.java and b.java
content of a.java:
package test;
import test1.*;
publuc class ATEST {
public static void main (String[] args) {
BTEST.call();
}
}
content of b.java:
package test1;
public class BTEST {
string name;
void call() {
.
.
}
}
Getting call() is not public in BTEST; cannot be accessed by outside package.
Question is b.java must be declared in this fashion. I need to add access modifiers so that call() and any constructors are the only things that are accessible from other packages. Any other method can only be accessed from the BTEST class.
Your kind assistance would be greatly appreciated.
Thanks,