can we declare private class in java file?

Answers were Sorted based on User's Feedback



can we declare private class in java file?..

Answer / 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

can we declare private class in java file?..

Answer / hanumanth

Can any one give example?

Is This Answer Correct ?    10 Yes 11 No

can we declare private class in java file?..

Answer / varsha vilas kalebag

yes we can declare private class in java file

Is This Answer Correct ?    46 Yes 131 No

Post New Answer

More Core Java Interview Questions

What is constructor in java ?

0 Answers  


How can you generate random numbers in java?

0 Answers  


What function extracts specified characters from a string?

0 Answers  


What is the return type of a program?s main() method?

3 Answers  


How to declare objects of a class ?

0 Answers   Akamai Technologies,






What is console based application in java?

0 Answers  


Matrix multiplication only using OOP concepts .

0 Answers  


What is aggregation and composition ?

1 Answers   Fidelity,


What is the reflection?

0 Answers  


What is the primitive type short?

0 Answers  


What is deserialization?

0 Answers  


Can we call the run() method instead of start()?

0 Answers  


Categories