So
30 40 + 2 * 5 6 + /
means
( 30 + 40 ) * 2 / ( 5 + 6 )
The operands are pushed to stack and operations typically operate on the top two elements, replacing them with the result. Compilers have to convert conventional infix notation to RPN or something similar get clear on the order of execution. Internally the JVM works with an RPN-like stack model and RPN-like stack operators.
![]() |
and suggestions to improve this page to Roedy Green : | ||
| Canadian Mind Products | |||
| mindprod.com IP:[65.110.21.43] | |||
| Your face IP:[38.103.63.58] | |||
| You are visitor number 11. | |||
| You can get a fresh copy of this page from: | or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror) | ||
| http://mindprod.com/jgloss/rpn.html | J:\mindprod\jgloss\rpn.html | ||