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

Define a java class.

1 Answers  


What are variable arguments or varargs?

0 Answers  


what is the use of datasource in core java?

3 Answers   Satyam,


Does apple use java?

0 Answers  


Which characters are allowed to use as the second character of an identifier, and which characters are not allowed?

2 Answers  






What is final class?

0 Answers  


What is procedure overloading?

0 Answers  


Write a code to create a trigger to call a stored procedure

0 Answers  


Can an arraylist be empty?

0 Answers  


What are the 3 types of loops in java?

0 Answers  


perpare on factorypattern,linklist wothout using collection, (multitharding ie create producer/customer therad producer create Queue continuesly,consumer consume queue, consumer wait if queue is full,producer wait if queue is empty),diff betn sleep(1000)&wait(1000) these r the main Q ask in huawei(2008)

1 Answers   Huawei,


what is the Arraylist limit (maximum) by default ?

13 Answers   Fidelity, PlanetSoft, Wipro,


Categories