Single Choice Not Set

QGiven the following piece of code:
public class School{
        public abstract double numberOfStudent();
}
which of the following statements is true?

ID: #2275 Java Interfaces And Abstract Classes MCQ 3,464 views
Question Info
#2275Q ID
Not SetDifficulty
Java Interfaces And Abstract Classes MCQTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A The keywords public and abstract cannot be used together.
  • B The method numberOfStudent() in class School must have a body.
  • C You must add a return statement in method numberOfStudent().
  • D Class School must be defined abstract.
Correct Answer

Explanation

Class School must be defined abstract.

Share This Question

Challenge a friend or share with your study group.