This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Stack; | |
public class InfixEvaluation { | |
public int evaluate(String expression){ | |
//Stack for Numbers | |
Stack<Integer> numbers = new Stack<>(); | |
//Stack for operators | |
Stack<Character> operations = new Stack<>(); | |
for(int i=0; i<expression.length();i++) { |