aspose file tools*
The moose likes Beginning Java and the fly likes confusing output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "confusing output" Watch "confusing output" New topic
Author

confusing output

kevinn lee
Ranch Hand

Joined: Feb 15, 2010
Posts: 87

why the output is not 100?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Because the leading 0 means the number is octal. Likewise, a number starting with 0x or 0X means the number is hexadecimal.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
kevinn lee
Ranch Hand

Joined: Feb 15, 2010
Posts: 87
Rob Prime wrote:Because the leading 0 means the number is octal. Likewise, a number starting with 0x or 0X means the number is hexadecimal.

thank you
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: confusing output
 
Similar Threads
Example in sample chapter
What causes InterruptedException? How to recover?
Getting error while serializing. Please see the following code while produces IOException.
Why my program works fine when i write Thread.sleep(0)
Value of int i=012;