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
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
What can be the issue and how to resolve the same?
thanks,
rdh
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
integer constant is considered an int by default
public static final long MAX_VAL = 4294967296L;