`"if ( ! (string1.equals(string2)) ) {....}"
or if you don't care about letter cases, use this..
"if ( ! (string1.equalsIgnoreCase(string2)) ) {....}" `
OR
public boolean equals(Object anObject) Parameters: **anObject **-- the object to compare this String against.
public boolean equals(Object anObject)
Return Value : This method returns true **if the String are equal; **false otherwise.
So do a if(string1.equals(string2)==0) means if they are not equal.
if(string1.equals(string2)==0)
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
`"if ( ! (string1.equals(string2)) ) {....}"
or if you don't care about letter cases, use this..
"if ( ! (string1.equalsIgnoreCase(string2)) ) {....}" `
OR
public boolean equals(Object anObject)
Parameters:
**anObject **-- the object to compare this String against.
Return Value :
This method returns true **if the String are equal; **false otherwise.
So do a
if(string1.equals(string2)==0)
means if they are not equal.