Search Interview Questions
| More than 3000 questions in repository.|
There are more than 900 unanswered questions.
Click here and help us by providing the answer.
Have a video suggestion.
Click Correct / Improve and please let us know.
|Java - Interview Questions and Answers|
|Ans. No Abstract methods can only be declared protected or public.|
|Help us improve. Please let us know the company, where you were asked this question :|
|Like Discuss Correct / Improve  java   abstract   oops   access specifier   private   yes-no intermediate   rare|
|Difference between Public, Private, Default and Protected ?|
|Enums cannot be declared ..|
| Why are Getter and Setter better than directly changing and retrieving fields ?|
What is the significance of variable hiding in Java ?
Why it's preferred to keep variables private and allow their access through getter and setter methods ?
|Which access specifiers can be used with top level class ? a. public or default b. public or private c. public or protected d. protected or default|
|enums are intrinsically ..|
| What is the difference between these two method declarations ?|
private static void method(String arg)
private static void method(String... arg)
|Can we declare interface methods as private ?|
|How can we create objects if we make the constructor private ?|
|Can we instantiate the object of derived class if parent constructor is protected ?|
|How can we test methods individually which are not visible or declared private ?|