12345678910111213141516171819202122232425262728293031 |
-
-
- import java.util.Scanner;
- public class IntegerPrinter {
- Scanner scan = new Scanner(System.in);
- public String printIntegerAsBinary(int value){
- //value = scan.nextInt();
-
- return Integer.toBinaryString(value);
- }
-
- public String printIntegerAsOctal(int value){
-
-
- return Integer.toOctalString(value);
-
-
- }
-
- public String printIntegerAsHexadecimal(int value){
- //value = scan.nextInt();
-
- return Integer.toHexString(value);
-
- }
-
- public static void main(String[] args){
- IntegerPrinter print = new IntegerPrinter();
- }
- }
|