How to convert a Binary String to a base 10 integer in Java

You need to specify the radix. There’s an overload of Integer#parseInt() which allows you to.

int foo = Integer.parseInt("1001", 2);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)