Return | Method | Summary |
---|---|---|
static String | toBinaryString(int i) | Return the binary string for i. |
static String | toHexString(int i) | Returns a hes string for i. |
static String | toOctalString(int i) | Returns a octal string for i. |
public class Main {
public static void main(String[] args) {
System.out.println(Integer.toBinaryString(10));
System.out.println(Integer.toHexString(10));
System.out.println(Integer.toOctalString(10));
}
}
The output:
1010
a
12
java2s.com | Contact Us | Privacy Policy |
Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
All other trademarks are property of their respective owners. |