IntegerPrinter.java 550B

123456789101112131415161718192021222324
  1. public class IntegerPrinter {
  2. public String printIntegerAsBinary(int value){
  3. //String x = Integer.toBinaryString(value);
  4. return Integer.toBinaryString(value);
  5. }
  6. public String printIntegerAsOctal(int value){
  7. //String x = Integer.toOctalString(value);
  8. return Integer.toOctalString(value);
  9. }
  10. public String printIntegerAsHexadecimal(int value){
  11. //String x = Integer.toHexString(value);
  12. return Integer.toHexString(value);
  13. }
  14. public static void main(String[] args){
  15. }
  16. }