提示:您可在线编辑运行本教程的实例 - 运行实例,去试试!
将八进制数转换为十进制数
//来自 n o w j a v a . c o m public class Main { public static void main(String[] args) { String strOctalNumber = "33"; int decimalNumber = Integer.parseInt(strOctalNumber,8); System.out.println("Octal number converted to decimal number"); System.out.println("Decimal number is : " + decimalNumber); } }