Best Interview Questions for OOPS/Inheritance


  1. Object-oriented programming uses classes and objects. What are classes and what are objects? What is the relationship between classes and objects?
  2. Explain carefully what null means in Java, and why this special value is necessary.
  3. What are the three parts of a simple empty class explain with example?
  4. What is a constructor? What is the purpose of a constructor in a class?
  5. What is meant by the terms instance variable and instance method?
  6. Explain what is meant by the terms subclass and superclass.
  7. Explain the term polymorphism.
  8. Java uses “garbage collection” for memory management. Explain what is meant here by garbage collection. What is the alternative to garbage collection?
  9. Bring out the importance of inheritance with the help of an example?
  10. When do we declare the members of the class as static explain with example?
  11. When do we declare a method or class as final explain with example?
  12. What is the advantage of using “this” keyword, explain?
  13. Explain about inner classes with an example?
  14. Explain how super keyword is used in overriding the methods?
  15. Explain the use of super() method in invoking a constructor?
  16. When does a base class variable get hidden, Give reasons?
  17. Explain with an example how we can access a hidden base class variable?

Suggested Course :

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see