1.

Which class does all the Enums extend?(a) Object(b) Enums(c) Enum(d) EnumClassThe question was posed to me in an interview for job.I would like to ask this question from Data Type-Enums in portion Data Types, Variables and Arrays of Java

Answer»

Right choice is (c) ENUM

Easiest EXPLANATION: All ENUMS implicitly extend java.lang.Enum. Since Java does not support multiple INHERITANCE, an enum cannot extend anything else.



Discussion

No Comment Found

Related InterviewSolutions