Notes
In Apex, you can also use the String.isNotBlank()
method to check if a string is not null and not empty. This method returns true
if the string is not null and contains at least one non-whitespace character.
Here's an example:
String email = '';
Boolean sendEmail;
if (String.isNotBlank(email)) {
sendEmail = true;
} else {
sendEmail = false;
}
System.debug(sendEmail);
Output: false
Video
Video does not exists.