To check if a string is null or empty in Java, use the == operator . Let’s say we have the following strings. String myStr1 = “Jack Sparrow”; String myStr2 = “”; Let us check both the strings now whether they are null or empty.6 Ara 2018
To check if a string is null or empty in Java, use the == operator . Let’s say we have the following strings. String myStr1 = “Jack Sparrow”; String myStr2 = “”; Let us check both the strings now whether they are null or empty.6 Ara 2018