Link to home
Start Free TrialLog in
Avatar of rohitdivas
rohitdivas

asked on

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
ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try
  public static final long MAX_VAL  = 4294967296L;  
integer constant is considered an int by default