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
how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)
What is a class variable?
What technique is carried out to find out if a particular string is empty?
What is the purpose of the finalize() method?
Is null a keyword in java?
Is string a wrapper class?
What is thread safe java?
What do you know about the garbate collector?
Explain the differences between static and dynamic variables?
why are wait(), notify() and notifyall() methods defined in the object class? : Java thread
These static constructors are correct ? class A { statc intA() { } static A(int x,int y) { } static A(int x) { } }
What does string mean in java?
how to create daemon thread in java?
What is the map interface in java programming?
Is string a data type in java?