Converting Number System

public static void main(String[] args) {
int binary = 4;
int hexadecimal = 43;
//Convert the integer to binary. Stored in String.
String bin = Integer.toBinaryString(binary);
System.out.println(binary + ” as binary: ” + bin);
//Convert the second integer into hex. Stored in String.
String hex = Integer.toHexString(hexadecimal);
System.out.println(hexadecimal + ” as hex: ” + hex);