Integer: toBinaryString(int intValue) : Integer « java.lang « Java by API
- Java by API
- java.lang
- Integer
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