29.How to convert Octal to Decimal.
💡Code:
public class OctalToDecimalConversion7078 {
public static void main(String[] args) {
// Example octal string
String octalString = "32";
// Convert octal to decimal
int decimalValue = Integer.parseInt(octalString, 8);
// Print the converted decimal value
System.out.println("Converted decimal value: " + decimalValue);
}
}
📸Output :