Monday, 9 September 2013

Won't let me initialize a final constant int?

Won't let me initialize a final constant int?

I need to initialize a constant int for this program but it's giving me
the error "Syntax error on token "NO_VALUE", delete this token", but
"NO_VALUE" is supposed to be the name of the int.
Here is the code where I try to initialize it
public class DayOfWeek {
int myMonth, myDayOfMonth, myYear, myAdjustment, numericDayOfWeek;
public final int constant NO_VALUE = -1;

No comments:

Post a Comment