If the class members declared public and the class itself is specified as default access
( Package access), then can the public members of that class be used in another package?
I am asking this because .. as far i know class which is not specified as public cannot be accessed outside the its package . But the method :
public static void main()
is accessible even from outside the package eventhough i dont specify the class in which the main() is placed as public.
How is it possible.
If public methods can be accessed from anywhere then what is advantage of using access specifier to class itself?