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

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Integer" Watch "Java Integer" New topic

Java Integer

shansi raj

Joined: Jul 05, 2006
Posts: 25
Is there any way to store the value "4294967295" as int in java?
Ilja Preuss

Joined: Jul 11, 2001
Posts: 14112
No, of course not. It's bigger than Integer.MAX_VALUE, isn't it?

Not a Swing question - moving to Java in General (beginner)...

The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Petrus Pelser
Ranch Hand

Joined: Feb 20, 2006
Posts: 132
Try using a long.
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11924

that's like saying "can i store a gallon of beer in a pint size glass". it just won't work.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
I agree. Here's the link:
subject: Java Integer
It's not a secret anymore!