can we declare private class in java file?

Answer Posted / aditya kumar

yes,from Java8 we can also declare private and protected Top level classes.....but i am not getting the reason behind this why oracle did it.So if any one has it's explanation plz tell me....

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between serializable and externalizable interfaces?

569


Which variables are stored in stack?

449


Where is core java used?

585


What is finally and finalize in java?

594


Differences between external iteration and internal iteration?

577






Can a class have a static inner class?

606


What is <> used for in java?

669


What is a control variable example?

529


What is a memory leak in java?

547


How to make a write-only class in java?

578


What is the difference between a choice and a list?

608


What is string and its types?

611


Can constructor be inherited?

577


Can we have static methods in an interface?

566


What is parsing in java?

531