ApexSensei

Drills Apex basics

Quick win: is the name blank?

Three things look empty to a user: null, '' and ' '.

Your task

Fill in the body of isBlankName so it returns String.isBlank(name).

Boolean isBlankName(String name) {
    return null;
}

Requirements

  1. isBlankName('Ana') should be false
  2. isBlankName('') should be true
  3. isBlankName(null) should be true
  4. isBlankName(' ') should be true

Sign in to open this drill