Created
January 16, 2020 22:22
-
-
Save parzibyte/fecbbbecbb5ce7ac3805d0c8801faf4a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Main { | |
public static void main(String[] args) { | |
String miCadena = ""; | |
if (miCadena.equals("")) { | |
System.out.println("Está vacía con equals"); | |
} | |
if (miCadena.isEmpty()) { | |
System.out.println("Está vacía con isEmpty"); | |
} | |
if (miCadena.length() <= 0) { | |
System.out.println("Está vacía con length"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment