Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
Why compiler complains "integer number too big" if I declare "int a=0000009"?
maddy snow
Greenhorn
Posts: 3
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
This doesn't make sense.
int a = 0000009;
it should be automatically convert to "9", shouldn't it?
Steve Fahlbusch
Bartender
Posts: 612
7
I like...
posted 9 years ago
2
Number of slices to send:
Optional 'thank-you' note:
Send
Greetings,
You need to do a little research into int literals.
As a hint - integer literals that start with a 0 are octal, not decimal and of course there is no such thing as a 9s digit in octal numbers (nor 8)
-steve
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
overloaded methods with boxing strange behaviour
implicit casting
Problem understanding autoboxing
Trouble with rint()
Type casting byte to Integer compile error
More...