12345678910111213141516171819202122232425262728 |
-
-
- public class IntegerPrinter {
-
- public String printIntegerAsBinary(int value){
-
- String b = Integer.toString(value,2);
- System.out.println(b);
- return b;
- }
-
- public static String printIntegerAsOctal(int value){
- String o = Integer.toString(value,8);
- System.out.println(o);
- return o;
- }
-
- public static String printIntegerAsHexadecimal(int value){
- String h = Integer.toString(value,16);
- System.out.println(h);
- return h;
- }
-
- public static void main(String[] args){
-
- }
- }
|