Question: Given the following enum declaration, how many lines contain compilation errors? A. Zero B. One C. Two D. Three E. More than three public enum
Given the following enum declaration, how many lines contain compilation errors?

A. Zero
B. One
C. Two
D. Three
E. More than three
public enum Proposition { TRUE (1) { String getNickName() { return "RIGHT"; }}, FALSE (2) { public String getNickName () { return "WRONG"; }}, UNKNOWN (3) { public String getNickName () { return "LOST"; }} public int value; } Proposition (int value) { this.value = value; } public int getValue () { return this.value; } protected abstract String getNickName();
Step by Step Solution
3.48 Rating (145 Votes )
There are 3 Steps involved in it
The image displays a code snippet of a Java enum called Proposition with three constants TRUE FALSE ... View full answer
Get step-by-step solutions from verified subject matter experts
