QuestionQ44

Working with Inheritance

Which three statements characterize the object-oriented features of the Java language?

Choose three
  • A Objects can be reused.
  • B A subclass must override the methods from a superclass.
  • C Objects can share behaviors with other objects.
  • D A package must contain a main class.
  • E Object is the root class of all other objects.
  • F A main method must be declared in every class.
Explanation

Java objects can be reused and can share behavior with other objects through object-oriented mechanisms such as inheritance. Every Java class ultimately derives from java.lang.Object, which is the root class of the Java class hierarchy.

Community Discussion

No comments yet. Be the first to start the discussion!