What is the correct way to check if String is empty in Java?
Answers
Answered by
0
Check if a String is empty ("") or null in Java. To check if a string is null or empty in Java, use the == operator. String myStr1 = "Jack Sparrow"; String myStr2 = ""; Let us check both the strings now whether they are null or empty.
please make me brainlist
Similar questions