- Code: Select all
class Toon {
public static void main(String[] args) {
Cloo c = new Cloo();
System.out.println(c.doRooThings()); //No problem; method is public
}
}
What I want to know is if class Toon and Cloo are in different packages, it will be compiling error or not?
Because class Cloo is default access not public.
