Polymorphism in Java Interview Questions
Explain Runtime Polymorphism in java?
Is it possible to achieve Runtime Polymorphism by data members in Java?
Difference between static and dynamic binding?
Explain Abstraction in Object-Oriented programming?
How is Abstraction different from Encapsulation?
What is an abstract class in Java?
Is it allowed to mark a method abstract method without marking the class abstract?
Marking a method abstract as well as final, Is it allowed?
Can we instantiate an abstract class in Java?
Explain interface in Java?
Is it allowed to mark an interface method as static?
Why an Interface cannot be marked as final in Java?
What is a marker interface?
What can we use instead of the Marker interface?
How Annotations are better than Marker Interfaces?
What is the difference between abstract class and interface in Java?
Does Java allow us to use private and protected modifiers for variables in interfaces?
Explain how to cast an object reference to an interface reference?
How can you change the value of a final variable in Java?
Can a class be marked final in Java?
How can we create a final method in Java?
Explain how to prohibit inheritance in Java?
Why Integer class is final in Java?
What is a blank final variable in Java?
How can we initialize a blank final variable?
Is it allowed to declare the main method as final?