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

An abstract method declares a method signature without implementation. It ends with a semicolon and has no body (no braces). Option C shows the correct syntax with semicolon and no braces.