Java OCA OCP Practice Question 26

Question

Which of the following are true?

  • A. An anonymous inner class may implement at most one interface.
  • B. An anonymous inner class may implement arbitrarily many interfaces.
  • C. An anonymous inner class may extend a parent class other than Object.
  • D. An anonymous inner class that implements one interface may extend a parent class other than Object.
  • E. An anonymous inner class that implements several interfaces may extend a parent class other than Object.


A, C.

Note

An anonymous inner class may either implement a single interface or extend a parent class other than Object, but not both.




PreviousNext

Related