We can convert octal to decimal in java using Integer.parseInt() method or custom logic.
The Integer.parseInt() method converts a string to an int with the given radix. If you pass 8 as a radix, it converts an octal string into decimal. Let us see the signature of parseInt() method:
Let's see the simple example of converting octal to decimal in java.
Output:
81
Let's see another example of Integer.parseInt() method.
Output:
81 19 8
We can convert octal to decimal in java using custom logic.
Output:
Decimal of 121 is: 81 Decimal of 23: 19 Decimal of 10 is: 8
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India