java integer to binary string with leading zeros

Solutions on MaxInterview for java integer to binary string with leading zeros by the best coders in the world

showing results for - "java integer to binary string with leading zeros"
Leni
07 Jan 2017
1int n = 1000;
2String.format("%16s", Integer.toBinaryString(n).replace(' ', '0');