wood burning stoves*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

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: http://aspose.com/file-tools
 
subject: Help with expression Tree