public final class RpnCalc extends Object
Math as operators. So exp is a method on class Math and
hence "exp" is also the name of a supported operator.| Constructor and Description |
|---|
RpnCalc()
Creates a new RPN calculator with an empty stack.
|
| Modifier and Type | Method and Description |
|---|---|
double |
evaluate(String expression)
Evaluates the supplied expression which should be written in RPN notation.
|
static void |
main(String[] args)
Command line version of this calculator.
|
public double evaluate(String expression)
expression - The expression to evaluate.public static void main(String[] args)
args - Optional RPN expression
Copyright © 2008–2017. All rights reserved.