integer too large issue!

Hi,
I am using jdk 1.4 jbuilder x to develop a small program.

When I compile my program it stops with an error -- integer number too large. The line it shows is

  public static final long MAX_VAL  = 4294967296;  

integer number too large: 4294967296

Although, long is 8 bytes signed (two's complement). Ranges from -9,223,372,036,854,775,808 to +9,223,372,036,854,775,807.

What can be the issue and how to resolve the same?
thanks,
rdh
rohitdivasAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
try:

  public static final long MAX_VAL  = 4294967296L;  
0
 
zzynxSoftware engineerCommented:
Try
  public static final long MAX_VAL  = 4294967296L;  
0
 
objectsCommented:
integer constant is considered an int by default
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.