simple string check

What i need to do is check that one (string)text feild is the same as another feild.

eg if text1 == text2,

if("text1".equals(text2))

i know this but i would like the opposite

if text1 does not == text2 then....

how would i write this

if(text1 != text2 ){}?

cheers in advance.

[326 byte] By [levidaviesa] at [2007-10-2 17:40:12]
# 1
if( ! text1.equals(text2) )or if(text1.equals(text2) == false)
kenmoberga at 2007-7-13 18:57:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
thanks k
levidaviesa at 2007-7-13 18:57:34 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...