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 in Java has no method body - just the signature followed by a semicolon. Option B shows the correct syntax for an abstract method declaration. Option A incorrectly includes a method body with curly braces, which would make it a concrete method. Option C uses semicolon incorrectly with braces.