java if not equal code example
Example 1: java not equal to
if(5 != 4) // != means "not equal to"
return true;
Example 2: not equal java
// Int version
int i = 2;
if (i != 3) {}
// String version
String s = "a";
if(!s.equals("b")) {}
if(5 != 4) // != means "not equal to"
return true;
// Int version
int i = 2;
if (i != 3) {}
// String version
String s = "a";
if(!s.equals("b")) {}