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

How large is a boolean?

1010


How to check if a list is sorted in java?

1033


Is oracle java 11 free?

946


What is externalizable interface?

1096


What is <> used for in java?

1110


What are the ways to instantiate the class class?

1100


Is singleton set an interval?

960


What Is Query Throttling in java?

997


Where is stringbuffer stored?

975


What is variable and its types?

1009


What class allows you to read objects directly from a stream?

1318


What is the purpose of using java.lang.class class?

1010


What is the difference between choice and list?

1086


How do you escape json?

993


Tell me are there implementations for sorting and searching in the java libarary?

1032