Check out example codes for "java string not equal". It will help you in understanding the concepts better.
Code Example 1
// Int version
int i = 2;
if (i != 3) {}
// String version
String s = "a";
if(!s.equals("b")) {}
Code Example 2
String name = "John";
// prints true to standard system output.
System.out.print(!name.equals("Alex"));
Code Example 3
if (!"success".equals(statusCheck))
Learn ReactJs, React Native from akashmittal.com