I don't understand what's wrong with the IndexOf function ???
public String[] PseudoExisteTest() {
  // looking if an XML tag contain "OK"
String exampleText = "<result>OK</result>";
int ind1;
int ind2;
String returnTable[] = new String[4];
String tag="result";
String textresult;
ind1=exampleText.indexOf("<"+tag+">");   // 0
ind2=exampleText.indexOf("</"+tag+">");  // 10
textresult=exampleText.substring(ind1+tag.length()+2, ind2);
    if ((textresult=="OK")) {     // YES  => Normally we pass here (="OK") !  
        returnTable[0]="It'OK";
        }
    else {
        returnTable[0]="Not, value is : "+textresult+"!";  // Not, value is : OK !!! ????? 
    }
    returnTable[1]="blabla";
    return returnTable;
}       
The value is "OK" but on the condition, that's don't works well ???? Is anybody can help me ?
Thanks in advance.
 
     
    