1234567891011121314151617181920212223 |
-
- public class IntegerPrinter {
- public String printIntegerAsBinary(int value){
- String convert = Integer.toBinaryString(value);
- System.out.println(convert);
- return convert;
- }
-
- public String printIntegerAsOctal(int value){
- String convert = Integer.toOctalString(value);
- return convert;
- }
-
- public String printIntegerAsHexadecimal(int value){
- String convert = Integer.toHexString(value);
- return convert;
- }
-
- public static void main(String[] args){
-
- }
- }
|