permaculture playing cards
The moose likes Java in General and the fly likes Help with expression Tree Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

Help with expression Tree

Dustin Schreader
Ranch Hand

Joined: May 25, 2009
Posts: 102
I'm trying to build an expression tree for the first time. There will be a prefix expression entered and I am thinking that I can check if there is an operator and if there is I can set the root node equal to the operator and if a number is the next character I can and the next char will be an int as well so i'd but I get an error because the interface is set to take TreeNode parameter. How Do I get it to accept an int single as a TreeNode? This is what I have so far.

And this is my interface
I agree. Here's the link:
subject: Help with expression Tree
It's not a secret anymore!