Multiple choice java

Which one of the following type-oriented statements is incorrect?

  1. User-defined types are also known as reference types.

  2. User-defined types are only defined via classes and interfaces.

  3. An array type is signified by an identifier and one or more pairs of square brackets.

  4. The declaration int[] x; introduces an array type.

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

In Java, user-defined types are reference types, but they are not limited to classes and interfaces. Enums and annotation types are also user-defined types. Furthermore, arrays are reference types but are not 'defined' by the user in the same way classes are, making the statement technically incorrect.