123456789101112131415161718192021222324252627 |
-
-
-
- public class IntegerPrinter {
- private String binaryValue;
- private String octalValue;
- private String hexValue;
- public String printIntegerAsBinary(int value){
- binaryValue = Integer.toBinaryString(value);
- return binaryValue;
- }
-
- public String printIntegerAsOctal(int value){
- octalValue = Integer.toOctalString(value);
- return octalValue;
- }
-
- public String printIntegerAsHexadecimal(int value){
- hexValue = Integer.toHexString(value);
- return hexValue;
- }
-
- public static void main(String[] args){
-
- }
- }
|