(String[] args)
| 3 | |
| 4 | public class InfixToPrefix { |
| 5 | public static void main(String[] args) { |
| 6 | System.out.println("1+2+3 -> " + infix2Prefix("1+2+3")); |
| 7 | System.out.println("A^B-(C+D) -> " + infix2Prefix("A^B-(C+D)")); |
| 8 | System.out.println("(P/L+(F*J) -> " + infix2Prefix("(P/L+(F*J)")); |
| 9 | } |
| 10 | public static String infix2Prefix(String expression){ |
| 11 | if(!BalancedBrackets.isBalanced(expression)) return "Invalid Expression"; |
| 12 | Stack<Character> operatorStack = new Stack<>(); |
nothing calls this directly
no test coverage detected