943,960 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 1103
  • Java RSS
Mar 9th, 2008
0

Inner class

Expand Post »
Is it necessary to declare an inner class private?If it is then plz specify the reason why is it necessary to declare an inner class private?
Similar Threads
Reputation Points: 9
Solved Threads: 1
Light Poster
Parsu7 is offline Offline
29 posts
since Feb 2008
Mar 9th, 2008
0

Re: Inner class

an inner class can have any modifier (eg public, private etc)
http://java.sun.com/docs/books/tutor...erclasses.html
Reputation Points: 256
Solved Threads: 72
Nearly a Posting Virtuoso
majestic0110 is offline Offline
1,306 posts
since Oct 2007
Mar 9th, 2008
0

Re: Inner class

> Is it necessary to declare an inner class private?

No. Here is some information which you would find useful when learning about Inner Classes.

EDIT: Too slow.
Last edited by ~s.o.s~; Mar 9th, 2008 at 3:13 pm.
Super Moderator
Featured Poster
Reputation Points: 3233
Solved Threads: 720
Failure as a human
~s.o.s~ is offline Offline
8,872 posts
since Jun 2006
Mar 10th, 2008
0

Re: Inner class

An inner class is nothing but a member of its enclosing class. Any member of class can be declated with access modifiers like public, private, protected.
Access modifiers make the member to be visible to others or not
Reputation Points: 10
Solved Threads: 1
Newbie Poster
madhusamala is offline Offline
8 posts
since Mar 2008
Mar 10th, 2008
0

Re: Inner class

though depending on what you want to use it for it may or may not require the static attribute.
That's the only one that in some cases is dictated.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: pllz help me with my program......
Next Thread in Java Forum Timeline: Need help with running





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC