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