Java String to int binary number conversion
<p>I'm trying to convert Strings of user input into int. No problem with that, i'm using the following code:</p>

<pre><code>c = sc.next();
while(!c.contains("#")){
    i = Integer.parseInt(c);
    input.add(c);
    c= sc.next();
}
</code></pre>

<p>(this is just the part of the code that does the conversion, the scanner part is working)</p>

<p>The only problem is that the input are binary numbers, so when the input is, for example "00111", the convert gives me "111" and i can't lose those 0's. How can i convert the user input into the number without losing the zeros to the left?</p>
