Java tutorial
//package com.java2s; public class Main { public static String binaryStringToDecimalString(String octal) { String decimal = "0"; try { decimal = Integer.valueOf(octal, 2).toString(); } catch (NumberFormatException e) { e.printStackTrace(); } return decimal; } }