can we declare private class in java file?

Answer Posted / eknath wagadre

private and static keyword in java we can't use those
keyword any of the outer block. we can use those keyword
only and only inside of the block.(Block i.e Class )

NOTE: Outer class can't be private but inner class can be
private(bcz of this is the part of the outer class and also
inner class can be static.)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the features in java?

809


What is functional interface in java?

767


What does the “final” keyword mean in front of a variable? A method? A class?

771


What is the purpose of tostring() method in java?

789


What is variable explain?

728


how is final different from finally and finalize in java?

815


What is difference between float and double?

699


How is string stored in java?

804


What is the memory leak in java?

743


What is complexity in java?

744


How to provide security in java

2012


Is java 9 released?

731


What are the properties of thread?

691


What is the difference between a synchronized method and a synchronized block?

852


Is hashset ordered?

766