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 |
Why is multiple inheritance not supported in java?
Hi Friends, Can u give few interview questions which relates ArrayList and Hashmap. I mean how to link ArrayList and HashMap.I know this is not good way of asking questions like this , but i need
What are the 8 primitive data types in java?
Who found java?
What is string array?
Is null a string?
What is JVM and is it platform independent?
what is mean by method signature?
Is there a sort function in java?
What's a method in programming?
. What are the differences between constructor and method of a class in Java?
What do you mean by data type?