enum declaration problem

When I try to declare this enum in IDEA IntelliJ 5.0.1

enum Distance {

RFID_L(1000),
RFID_O(340),
RFID_M(943),
RFID_C(860);

private int distance;

Distance(int distance) {

this.distance = distance;

}

public int getDistance() {

return distance;

}

}

it has a warning "Unnecessary semicolon ';'" and point at the semicolon after "RFID_C(860)". If I remove this semicolon, it has an error "',' or ';' expected".

Please chek it!

5 comments

I don't know why I can not login into JIRA with my account. :(

"Sorry, your username and password are incorrect - please try again."

0

Ok now, I must to re-signup to JIRA.

Posted the error!

0

When I try to declare this enum in IDEA IntelliJ 5.0.1

enum AccessPoint {

RFID_L(1000),
RFID_O(340),
RetailTech(500),
RFID_M(943),
RFID_C(860)

private int distance;

AccessPoint(int distance) {

this.distance = distance;

}

public int getDistance() {

return distance;

}

}

it has a warning "Unnecessary semicolon ';'" and point at the semicolon after "RFID_C(860)". If I remove this semicolon, it has an error "',' or ';' expected".

See my blog for more detail http://t800t8.blogspot.com/2005/09/bug-in-idea-intellij-501-build-3461.html

0

Please sign in to leave a comment.