IntegerPrinter.java 417B

12345678910111213141516171819202122
  1. public class IntegerPrinter {
  2. public String printIntegerAsBinary(int value){
  3. return Integer.toString(value, 2);
  4. }
  5. public String printIntegerAsOctal(int value){
  6. return Integer.toString(value, 8);
  7. }
  8. public String printIntegerAsHexadecimal(int value){
  9. return Integer.toString(value, 16);
  10. }
  11. public static void main(String[] args){
  12. }
  13. }