Hi, i have a following string : "if ( ((X < 20 ) && ( Y > 50)) | | ( Z ==56) ) " i want to convert it to a java condtional expression...how can i do that ?? as a matter of fact i want to know is there any generic way to convert any string to a corresponding java expression or statement or variable declaration. thanks Oni
Joined: Jan 09, 2001
Hi, You can do it through hard work and recursive procedures ... There is no generic way to convert any string to a corresponding java expression or statement, but there is a specific way. Sun defined a way to do it. They even went so far as designing it and giving it away to the public. They even supplied a specification guide and everything! Manfred.
Joined: Sep 29, 2000
I am a bit confused (as usual). Are you looking to take in this string when you execute your code? If so you would already be past the compile point and who cares if it is a java conditional expression or not. I think that I need straightening out.....
"JavaRanch, where the deer and the Certified play" - David O'Meara