lundi 30 mars 2015

How to Use Eval Method

I'm having a problem trying to get evaluating a String. My evaluation method is correct so I'm not going to share it, but I can't seem to get the method actually get to the point of evaluation. I've been trying just about everything and it seems like I'm either getting object references, or it want's identifiers, or different types (static vs non-static).


What I want is to know how to get the method eval() to work.


Anyway, here's the code:



public class Postfix
{
String expr;

public Postfix(String e)
{
expr = e;
}

public double eval()
{
stuff;
}
}

Aucun commentaire:

Enregistrer un commentaire