Correction: BINARY to HEXADECIMAL
I have write some simple code for this matter
Expand|Select|Wrap|Line Numbers
- public class DecimalToHexadecimal{
- public static void main(String[] args) throws IOException{
- BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
- System.out.println("Enter the decimal value:");
- String hex = bf.readLine();
- int i = Integer.parseInt(hex);
- String hex1 = Integer.toHexString(i);
- System.out.println("Hexa decimal: " + hex1);
- }
- }
2nd Question:
The different between java.util, java.lang, java.io
Thanks in advance :)