I tried to convert octal numbers to decimal numbers and I found the formula but I am expecting a different way.
My way is: the octal is $547$.
Formula: $(5*8^2)+(4*8^1)+(7*8^0)$
Answer: $355$
But I am expecting a different way.
Since I want to implement the concept to my java program and please kindly give any one update for this concept.
Your way looks fine, except for your final result:
$$5 \cdot 8^2 + 4 \cdot 8^1 + 7 \cdot 8^0 = 5 \cdot 64 + 4 \cdot 8 + 7 \cdot 1 = 320+32+7=359$$
A second way is Horner's method (only for decimal-system) for using in calculation:
You also start with $359=5 \cdot 8^2 + 4 \cdot 8^1 + 7 \cdot 8^0$. Thats a sum of 3 products (left factor is your number, right factor is a multiple of 8). Re-arrange:
$$1\cdot 7 + 4 \cdot 8 + 5 \cdot 8^2=359$$
$$7+8\cdot (4+8\cdot 5)=359$$
Now you can use a calculator:
Hope this helps.