Java program to print decimal to octal conversion

Java program to print decimal to octal conversion. In a Java program, convert decimal to octal. Decimals are one of the types of numbers since a decimal point distinguishes the whole number from the fractional variable. 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.

public class Main
{ 
public static void main(String args[])
{ 
System.out.println(Integer.toOctalString(15)); 
}
} 

Output

17