Use Integer.parseInt (see javadoc), that converts your String to int using base two:
int decimalValue = Integer.parseInt(c, 2);
Use Integer.parseInt (see javadoc), that converts your String to int using base two:
int decimalValue = Integer.parseInt(c, 2);