can we declare private class in java file?

Answer Posted / honey

main class can not be make private in java ,only the nested class can be make privateand it can be assessable only in the main class not access by any other class in the package.

Is This Answer Correct ?    13 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to make a non daemon thread as daemon?

811


Can you explain the usages of class.forname()?

861


What is compiler and what its output.

900


What is string and its types?

856


Difference between operator overloading and function overloading

832


Tell me the Importent classes in net package?

1772


What is the impact of declaring a method as final?

770


What is main string [] args?

744


What is an empty string in css?

775


What is treemap in java?

736


What is method and methodology?

866


Can inner class extend any class?

814


How do you join strings in java?

762


make a method which any number and any type of argument and print sum of that arguments.....

1593


Why java is considered as platform independent?

785