Java OCA OCP Practice Question 525

Question

Which of the following may appear on the right-hand side of an instanceof operator? (Choose all that apply.)

  • A. A reference
  • B. A class
  • C. An interface
  • D. A variable of primitive type
  • E. The name of a primitive type


B, C.

Note

Classes, interfaces, arrays of classes, and arrays of interfaces may be the right-hand operands of instanceof.




PreviousNext

Related