binary string to int java

Java
int foo = Integer.parseInt("1001", 2); // 2 is the radixint decimal=Integer.parseInt(binaryString,2);
Source

Also in Java: