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

why an outer class cannot be declared as private?

Answer Posted / ravi kumar

private class PrivateClass //You cannot use private here
{
}


class TestClass //This is valid
{
}
}
This is because, in above example, if you declare PrivateClass as private then it's private to what? As Vijay said, it is of no use. So, intellisense intelligently doesn't show 'private' .

also another thing that private class can not be instantiate means u can not create object that class then what will be use of that class

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are scriptlets?

1132


Differences between C and Java?

1275


What is meant by design patterns?

1088


How do you change an int to a string?

1058


What do u mean by variable?

1105


What are the benefits of operations in java?

1126


Explain the usage of this with constructors?

1068


List some important characteristics on jre

1128


Explain oops concepts in detail?

1071


What is a methodologist?

1132


What are some alternatives to inheritance?

1161


Are true and false keywords?

1067


Explain the difference between extends thread vs implements runnable in java?

1191


Can you have two constructors in java?

1042


Can we execute java program without main method?

1183