Postfix notation is an unambiguous way of writing an arithmetic expression without parentheses. It is defined so that if
exp1 op exp2is a normal fully-parenthesized expression whose operation is op, then the postfix version of this is
pexp1 pexp2 opwhere pexp1 is the postfix version of exp1 and pexp2 is the postfix version of exp2. The postfix version of a single number is just that number. So, for example, the postfix version of
((5+2)*(8-3))^4is
5 2 + 8 3 - * 4 ^Write a Java program that evaluates an expression that is input in postfix notation. Your program should support numbers input as integers or (floating point) doubles, and it should support the following operators: