Octal to hexadecimal conversion program in java

Octal to hexadecimal conversion program in java. In a Java program, convert an octal number to a hexadecimal number. This isn’t your typical octal to hexadecimal converter. The octal numeral system, also known as oct, is a base-8 numbering system that employs the digits 0 through 7. By grouping consecutive binary digits into groups of three, octal numerals can be generated from binary numerals. Relating to or using a system of numerical notation with a foundation of 16 rather than 10. 

import java.util.Scanner;
public class Main
public static void main(String args[])
String octalnumber, hexadecimal;
int decimalnum;
Scanner scan = new Scanner(System.in);
System.out.print("Enter Octal Number ");
octalnumber = scan.nextLine();
decimalnum = Integer.parseInt(octalnumber, 8);
hexadecimal = Integer.toHexString(decimalnum);
System.out.print("Hexadecimal Value of " + octalnumber + " is :\n");

Enter Octal Number : 56                                                                                                       

Equivalent Hexadecimal Value of 56 is :