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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
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');