very frustrating problem with IF statement
Answered
- Need more info
- Answered
- Working on it
in
Programming Questions
•
3 years ago
Howdy all;
I'm encountering a very frustrating problem with the below IF statement:
- String test = placemark.getChild(3).getName();
- if (test == "Polygon") {
- XMLElement polygon = placemark.getChild(3);
- XMLElement outerBound = polygon.getChild(0);
For some reason, test == "Polygon" will NOT return true. I've verified that the output from the getName() method is indeed a String, and that it is "Polygon" with identical capitalization and no leading or trailing spaces. Does anyone have any ideas what else could be the problem?
Many thanks,
Josh
1