Multiple choice technology programming languages

Which of the following is correct syntax for an Abstract class ?

  1. abstract double area() { }

  2. abstract double area()

  3. abstract double area();

  4. abstract double area(); { }

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

In Java, an abstract method declaration must not have a method body (no braces {}) and must end with a semicolon, preceded by the abstract keyword. Therefore, abstract double area(); is the correct syntax. Option 607836 lacks a semicolon, and the others include braces.