Empty strings in Java
Forums:
//Empty strings
String someEmptyString = "";
String anotherEmptyString = new String();
if (anotherEmptyString.isEmpty()) {
//string is empty
}
- Log in to post comments
//Empty strings
String someEmptyString = "";
String anotherEmptyString = new String();
if (anotherEmptyString.isEmpty()) {
//string is empty
}