Hello All
I have an issue.
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,
The Ozman
ozman26 0 Newbie Poster
stultuske 1,116 Posting Maven Featured Poster
ozman26 0 Newbie Poster
stultuske 1,116 Posting Maven Featured Poster
ozman26 0 Newbie Poster
stultuske 1,116 Posting Maven Featured Poster
ozman26 0 Newbie Poster
ozman26 0 Newbie Poster
xPro 0 Newbie Poster
stultuske 1,116 Posting Maven Featured Poster
JamesCherrill 4,733 Most Valuable Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.