Podcast
Questions and Answers
Which type of inheritance is not supported in Java?
Which type of inheritance is not supported in Java?
- Single inheritance
- Multiple inheritance (correct)
- Hierarchical inheritance
- Multilevel inheritance
What is the advantage of inheritance?
What is the advantage of inheritance?
- It facilitates code reusability
- It saves on modification time and efforts
- It simulates the transitive nature of real-world inheritance
- All of the above (correct)
Which access specifier allows members of a class to be used within its own class and subclass present in another package?
Which access specifier allows members of a class to be used within its own class and subclass present in another package?
- Protected (correct)
- Default or friendly
- Private
- Public
Which access specifier allows members of a class to be accessible everywhere, including other packages?
Which access specifier allows members of a class to be accessible everywhere, including other packages?
What is the default access specifier for members of a class?
What is the default access specifier for members of a class?