File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Range of Data Type double Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Badass: Making Users Awesome this week in the Game Development forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Range of Data Type double" Watch "Range of Data Type double" New topic

Range of Data Type double


Joined: Nov 16, 2001
Posts: 18
As per the Book, long Data Types Range is -9223372036854775808 to 9223372036854775807. Ex. long l = 9223372036854775807.
I got an error message while compiling this above statement.The Error message is : "integer number too large: 922337203685477580"
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
To make it a long you need to put an L at the end of the assignment statement:
long l = 9223372036854775807L;
that should take care of it for you. Without the L the compiler thought it was an int.
hope that helps

Sun Certified Programmer for the Java� 2 Platform

I agree. Here's the link:
subject: Range of Data Type double