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
What are scriptlets?
Differences between C and Java?
What is meant by design patterns?
How do you change an int to a string?
What do u mean by variable?
What are the benefits of operations in java?
Explain the usage of this with constructors?
List some important characteristics on jre
Explain oops concepts in detail?
What is a methodologist?
What are some alternatives to inheritance?
Are true and false keywords?
Explain the difference between extends thread vs implements runnable in java?
Can you have two constructors in java?
Can we execute java program without main method?