public abstract class Animal {
public abstract String sound();
}
// Usage:
Animal a = new Animal();What occurs?
- A
Compiles fine
- B
Compiles and creates an Animal with null sound
- Ccheck_circle
Compile error: Animal is abstract; cannot be instantiated
- D
Runtime error when sound() is called
Explanation
Abstract classes cannot be directly instantiated with new. The compiler reports an error.