IntegerPrinter.java 535B

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