File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Node.js in Action
this week in the
Underscores in Numeric Literals doubt
Joined: Feb 09, 2012
Jun 26, 2012 05:11:54
int j=0x_52;//not valid int i=0_52; //(octal)why it is valid ? //rule:we cannot put underscore at the beginning of a number.
I've mindset that as 0x is used to represent hex number same as 0 at 0_52 is being used to represent octal number so actual number will be 52.Hence _ before 52 should not be valid.please help
Tell the difficulties that i am difficult.
Joined: Jul 20, 2005
Jun 26, 2012 05:26:48
Locking this one. Please continue this discussion in your other thread here
I agree. Here's the link:
subject: Underscores in Numeric Literals doubt
Range of Octals
Octal number conversion
Underscores in Numeric Literals
How many digits an octal number have ?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014