skip to main | skip to sidebar

Java & BlackBerry - Fan's Blog

Monday, August 06, 2007

How to get the hexadecimal value of an int

You can print the hexadecimal value of an int in Java with the following code:
int i = 0xf1;
System.out.println("i is hex " + Integer.toHexString(i) );
Posted by mittolemon at 8:03 AM
Labels: J2SE Tips

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

main menu

  • BlackBerry
  • J2EE
  • J2SE Tips
  • Music i like

Blog's Posts

  • ►  2008 (42)
    • ►  08 (16)
    • ►  03 (4)
    • ►  02 (10)
    • ►  01 (12)
  • ▼  2007 (51)
    • ►  12 (6)
    • ►  11 (4)
    • ►  10 (11)
    • ►  09 (9)
    • ▼  08 (9)
      • How to create a Search Crawler in Java
      • How to create a download manager in Java
      • Invoke method using Reflection
      • How to copy a directory from one location to anoth...
      • Encryption and Decryption using Symmetric Keys
      • Priority Queue - Binary Heap - Implementation in Java
      • How to use a slider with tick marks and labels
      • How to get the hexadecimal value of an int
      • Changing the Cursor
    • ►  07 (6)
    • ►  06 (6)