Computer Science, asked by shehalasherin3992, 1 year ago

What is the correct way to check if String is empty in Java?

Answers

Answered by pandeysakshi2003
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