Integer: toBinaryString(int intValue) : Integer « java.lang « Java by API






Integer: toBinaryString(int intValue)

 
/*
 * Output:
 
Binary is 1011


 */

public class MainClass {
  public static void main(String args[]) {
    int i = 11;
    System.out.println("Binary is " + Integer.toBinaryString(i));
  }
}
           
         
  








Related examples in the same category

1.Integer.MAX_VALUE
2.Integer: MIN_VALUE
3.Integer: Integer.SIZE
4.Integer: bitCount(int i)
5.Integer: equals(Object obj)
6.Integer: highestOneBit(int i)
7.Integer: intValue()
8.Integer: lowestOneBit(int i)
9.Integer: numberOfLeadingZeros(int i)
10.Integer: numberOfTrailingZeros(int i)
11.Integer: reverseBytes(int i)
12.Integer: rotateLeft(int i, int distance)
13.Integer: signum(int i)
14.Integer: toHexString(int intValue)
15.Integer: toOctalString(int intValue)
16.Integer: parseInt(String stringValue)
17.Integer: valueOf(String stringValue)