Java / Access Modifiers
1.
Can a class be declared as private?
2.
Can a class be declared protected?
3.
Can an interface be declared protected?
4.
What are the applicable access specifier for a class/interface/abstract class?
5.
Can we run a Java program without main method?
Could not find what you were looking for? send
us the question and we would be happy to answer your question.
1. Can a class be declared as private?
2. Can a class be declared protected?
3. Can an interface be declared protected?
4. What are the applicable access specifier for a class/interface/abstract class?
It can be public or no access specified(default access).
5. Can we run a Java program without main method?
No. However until Java 7, we can execute by using static blocks....