• Post Reply Bookmark Topic Watch Topic
  • New Topic

Java Integer  RSS feed

 
shansi raj
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there any way to store the value "4294967295" as int in java?
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, of course not. It's bigger than Integer.MAX_VALUE, isn't it?

Not a Swing question - moving to Java in General (beginner)...
 
Petrus Pelser
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using a long.
 
fred rosenberger
lowercase baba
Bartender
Posts: 12443
42
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
that's like saying "can i store a gallon of beer in a pint size glass". it just won't work.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!