Java program to print decimal number to binary

Java program to print decimal number to binary. In Java, convert a decimal number to a binary number. A decimal point separates the entire number from the fractional component, making decimals one of the forms of numbers. A binary number is a number represented in the base-2 numeral system or binary numeral system,which uses only two symbols: commonly “0” and “1” in mathematics and digital electronics.

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

101