Java program to convert decimal to binary


Program
import java.util.*; public class DecimalToBinary{ public static void main(String args[]){ Scanner s=new Scanner(System.in); int decimal=s.nextInt(); System.out.println(Integer.toBinaryString(decimal)); } }
Input
Output