nerdexam
Oracle

1Z0-803 · Question #37

Given: What is true about the class Wow?

The correct answer is A. It compiles without error.. An abstract class can contain abstract and non-abstract methods. However, an abstract method must be contained within an abstract class. An abstract class can have private methods as long as they are not declared abstract. An abstract class can have instance variables. An abstrac

Working with Inheritance

Question

Given:

What is true about the class Wow?

Exhibit

1Z0-803 question #37 exhibit

Options

  • AIt compiles without error.
  • BIt does not compile because an abstract class cannot have private methods.
  • CIt does not compile because an abstract class cannot have instance variables.
  • DIt does not compile because an abstract class must have at least one abstract method.
  • EIt does not compile because an abstract class must have a constructor with no arguments.

How the community answered

(22 responses)
  • A
    86% (19)
  • B
    5% (1)
  • E
    9% (2)

Explanation

An abstract class can contain abstract and non-abstract methods. However, an abstract method must be contained within an abstract class. An abstract class can have private methods as long as they are not declared abstract. An abstract class can have instance variables. An abstract class does not have to have at least one abstract method. An abstract class does not have to have a constructor without arguments.

Topics

#abstract classes#abstract methods#inheritance rules

Community Discussion

No community discussion yet for this question.

Full 1Z0-803 Practice