why an outer class cannot be declared as private?
Answer / 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 |
What is the difference between a scrollbar and a scrollpane?
What is binary tree in java?
whats string ?
what is use of functional interface in java 8?
What is static binding and where it occurs?
What classes of exceptions, thrown by a throw statement?
Is stringwriter thread safe?
Give an example of use of pointers in java class.
What is primitive data type in java?
Does java support Operator Overloading?
i need income tax program using java inheritance concept. could u please help me?
What ide should I use for java?