import java.util.Scanner; public class Postfix { public static void main(String [] args) { Stack operands = new Stack(); char[] expression = {'7','5','-','4','*','6','1','2','+','/','+'}; for(int i = 0; i < expression.length; i++) { // Case 1: the next token is a number if(Character.isDigit(expression[i])) { } // Case 2: the next token is an operator else { int b = ; int a = ; char op = ; // Our next action depends on what operator we saw } } // Print out the result of the computation } }