Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@deepakmehra10
Last active March 10, 2020 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deepakmehra10/28e760b32294b61865ac0455c552dd39 to your computer and use it in GitHub Desktop.
Save deepakmehra10/28e760b32294b61865ac0455c552dd39 to your computer and use it in GitHub Desktop.
String name = "";
System.out.println(name.isEmpty()); // true
String name1 = " ";
System.out.println(name1.isEmpty()); // false
String name2 = " ";
System.out.println(name2.isBlank()); // true
String name3 = "";
System.out.println(name3.isBlank()); // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment