Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

can we declare private class in java file?

Answer Posted / manoj purohit

•Only nested classes can be private. If a top-level class
were private, nothing could access it.

So, private nested classes are just like other private
members (methods and variables)--they can only be
accessed "within the body of the top level class that
encloses the declaration of the member or constructor"

Private classes are to be used only by their declaring
class (more or less) just like other private members

Is This Answer Correct ?    117 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about fail fast iterators in java?

1041


Explain features of interfaces in java?

966


Does java map allow duplicates?

872


What is public static void main?

1085


What is meant by oops concept in java?

975


What is the basic difference between string and stringbuffer object?

1067


What is the use of protected in java?

1005


What is a class object?

951


Can we serialize singleton class?

1023


What does java ide mean?

1111


How do you compare values in java?

1013


What is the purpose of garbage collection in java, and when is it used?

1021


What are the super most classes for all the streams?

2510


What is the use of set in java?

1105


who can i handle multiple client in RMI

1873