Multiple choice technology

Which of the following statements are true? (A) An abstract class may not have any final methods. (B) A final class may not have any abstract methods. (C) An inner class may be declared with any accessibility keyword. (D) Transient variables must be static.

  1. A) & (C)

  2. (B) & (C)

  3. A

  4. D

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

Statement B is true: a final class cannot be subclassed, so it cannot have abstract methods (which would imply incomplete implementation). Statement C is true: inner classes can be declared with any accessibility modifier (public, protected, private, default). Statement A is false: abstract classes can have final methods; final just prevents overriding, which doesn't conflict with abstract classes. Statement D is false: transient has no relationship to static.