Which code fragment is illegal? (Exhibit)

By | January 1, 2023

Which code fragment is illegal?

Correct Answer: D
The abstract keyword cannot be used to declare an int variable.
The abstract keyword is used to declare a class or method to be abstract[3]. An abstract method has no implementation; all classes containing abstract methods must themselves be abstract, although not all abstract classes have abstract methods.