Meaningless Drivel is fun!
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes toHexString and toOctalString Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "toHexString and toOctalString" Watch "toHexString and toOctalString" New topic
Author

toHexString and toOctalString

Harikrishna Gorrepati
Ranch Hand

Joined: Sep 23, 2010
Posts: 423
Hi, How to understand the following toHexString and toOctalString methods(). Please advice



OCPJP 6.0-81% | Preparing for OCWCD
http://www.certpal.com/blogs/cert-articles | http://sites.google.com/site/mostlyjava/scwcd |
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3892
    
  18

toHexString simply converts an integer into its hexadecimal string representation. toOctalString does the same thing, except the representation is octal, not hexadecimal.

If you do not understand what this means, look up what numeral system and radix are.


The mind is a strange and wonderful thing. I'm not sure that it will ever be able to figure itself out, everything else, maybe. From the atom to the universe, everything, except itself.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: toHexString and toOctalString
 
It's not a secret anymore!