+ 2
What does int a=Integer.parseInt(a,2);do when String a="1010";
From challenge
2 Answers
+ 7
Integer.parseInt(String)
Will cast the argument to a int.
Integer.parseInt(String, int)
The String is what will be casted, the int is what base the String is in.
So, in this example the string will be casted to a number (10) from base 2.