wood burning stoves 2.0*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Outputting Number is Hex Format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Outputting Number is Hex Format" Watch "Outputting Number is Hex Format" New topic
Author

Outputting Number is Hex Format

vinay jain
Greenhorn

Joined: Nov 07, 2001
Posts: 27
Hello there
Does Anybody knows how I can output a number in Hex Notation rather then the default decimal notation.
Thanks
Udayan Naik
Ranch Hand

Joined: Oct 18, 2000
Posts: 135
I think Integer.toHexString(int) isthe one you are looking for.
------------------
Udayan Naik
Sun Certified Programmer for the Java 2 Platform


Udayan Naik<BR>Sun Certified Programmer for the Java 2 Platform
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Outputting Number is Hex Format
 
Similar Threads
Hexadecimal Numbers
int
Integer min and max
how to get rid of auto hex numerals display
How does this print -1