stacks and queues (this is the opposite of the infix-to-postfix translation algorithmwhere operators were stored on the stack you can use the rules shown in table to evaluate postfix expressions table evaluating postfix expression item read from postfix expression action operand operator push it onto the stack pop the top two operands from the stack and apply the operator to them push the result when you're donepop the stack to obtain the answer that' all there is to it this process is the computer equivalent of the human circle-drawing approach of figure java code to evaluate postfix expressions in the infix-to-postfix translationwe used symbols (aband so onto stand for numbers this approach worked because we weren' performing arithmetic operations on the operands but merely rewriting them in different format now we want to evaluate postfix expressionwhich means carrying out the arithmetic and obtaining an answer thusthe input must consist of actual numbers to simplify the codingwe've restricted the input to single-digit numbers our program evaluates postfix expression and outputs the result remember numbers are restricted to one digit here' some simple interactionenter postfix stack (bottom-->top) stack (bottom-->top) stack (bottom-->top) evaluates to you enter digits and operatorswith no spaces the program finds the numerical equivalent although the input is restricted to single-digit numbersthe results are notit doesn' matter if something evaluates to numbers greater than as in the infix java programwe use the displaystack(method to show the stack contents at each step listing shows the postfix java program listing the postfix java program /postfix java /parses postfix arithmetic expressions /to run this programc>java postfixapp