convert string of binary to int in java code example
Example 1: convert string to int java
String myString = "1234";
int foo = Integer.parseInt(myString);
Example 2: binary to integer in java
System.out.println(Integer.parseInt("1010",2));
String myString = "1234";
int foo = Integer.parseInt(myString);
System.out.println(Integer.parseInt("1010",2));