how to print int in bit form java code example Example: java integer to binary string int n = 1000; String s = Integer.toBinaryString(n);