Dead easy, just put the '!' before your condition. For example:
public class TestApp
{
public static void main(String[] args)
{
int count = 0;
System.out.println("Starting program");
String testString1 = "hello";
String testString2 = "world";
while(!testString1.equals(testString2) && count != 2000)
{
count++;
System.out.println("Number "+count+" This means it is not equal");
}
}
}
The count is there just to stop the infinite while loop that killed my computer!