The description" Polish" refers to the nationality of logician Jan Łukasiewicz, who invented Polish notation in 1924.The reverse Polish scheme was proposed in 1954 by Arthur Burks, Don Warren, and Jesse Wright and was independently reinvented by Friedrich L. Bauer and Edsger W. Dijkstra in the early 1960s to reduce computer memory access and use the stack to evaluate expressions. Reverse Polish notation (RPN), also known as Polish postfix notation or simply postfix notation, is a mathematical notation in which operators follow their operands, in contrast to Polish notation (PN), in which operators precede their operands. One of the designers of the B5000, Robert S. Barton, later write that he developed reverse Polish notation independently of Hamblin sometime in 1958 after reading a 1954 textbook on symbolic logic by Irving Copi, where he found a reference to Polish notation, which made him read the works of Jan Łukasiewicz as well, and before he was aware of Hamblin's work. The first computers to implement architectures enable reverse Polish notation were the English electric company's KDF9 machine, which was announced in 1960 and delivered (i.e. made available commercially) in 1963, and the American Burroughs B5000, announced in 1961 and also delivered in 1963.Designed by Robert" Bob" Appleby Ragen, Friden introduced reverse Polish notation to the desktop calculator market with the EC-130 supporting a four-degree stack in June 1963.

COMING SOON!

```
package Others;
import java.util.*;
public class StackPostfixNotation {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String post = scanner.nextLine(); // Takes input with spaces in between eg. "1 21 +"
System.out.println(postfixEvaluate(post));
scanner.close();
}
// Evaluates the given postfix expression string and returns the result.
public static int postfixEvaluate(String exp) {
Stack<Integer> s = new Stack<Integer>();
Scanner tokens = new Scanner(exp);
while (tokens.hasNext()) {
if (tokens.hasNextInt()) {
s.push(tokens.nextInt()); // If int then push to stack
} else { // else pop top two values and perform the operation
int num2 = s.pop();
int num1 = s.pop();
String op = tokens.next();
if (op.equals("+")) {
s.push(num1 + num2);
} else if (op.equals("-")) {
s.push(num1 - num2);
} else if (op.equals("*")) {
s.push(num1 * num2);
} else {
s.push(num1 / num2);
}
// "+", "-", "*", "/"
}
}
tokens.close();
return s.pop();
}
}
```