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 / ranganathkini

A class can be marked by the "private" access specifier only
if its a nested member of another class.

Top level classes cannot be marked as "private". Hence you
can have private classes in a java file but they must be
nested inside another class.

Is This Answer Correct ?    208 Yes 16 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between hashset and treeset in java?

1020


Is string a class in java?

938


What is the largest number a double can hold?

993


What is the java reflection api? Why it’s so important to have?

936


Explain the importance of finally over return statement?

1000


What is the map interface in java programming?

977


What is a Hash Table? What are the advantages of using a hash table?

1043


Is integer immutable in java?

940


What are recursive functions? Give some examples?

1144


What is the intersection and union methods?

987


Which class represents the socket that both the client and server use to communicate with each other?

985


Can we declare register variable as global?

902


What is use of super keyword?

919


Is age a discrete variable?

927


What is the difference between procedural and object-oriented programs?

945