Online Java Compiler By
JavaTpoint.com
public class IntegerToBinaryStringExample1 { public static void main(String[] args) { int i = 121; System.out.println("Number = " + i); //returns the string representation of the integer value in binary form System.out.println("Binary representation is = " + Integer.toBinaryString(i)); } }
Output