IntegerPrinter.java 466B

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