Hi,

On Jul 1, 1:17 am, ρ Я д Ŧ έ e Қ ....Me |\|0T ThaT BaDD***
<[email protected]> wrote:
> 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 .

Perhaps this helps:
http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to