class a { public void aFn() { System.out.println("Im in A"); } } class b {
public void bFn() { System.out.println("I'm in B"); } public static void
main(String args[]) { a aobj= new a(); aobj.aFn(); b bobj= new b();
bobj.bFn(); } } the name of the file saved is b.java The output is Im in A
Im in B My question is that how can we access other class as the default
access specifier is package. we haven't imported the package. Please clear
me through the concept of accessing a class .--~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
