ApexSensei

Drills Apex basics

Quick win: join a full name

When you join two variables you must add the glue yourself.

Your task

Fill in the body of fullName so it returns first + ' ' + last.

String fullName(String first, String last) {
    return null;
}

Requirements

  1. fullName('Ada', 'Lovelace') should be Ada Lovelace
  2. fullName('Grace', 'Hopper') should be Grace Hopper
  3. fullName('Li', 'Wu') should be Li Wu
  4. fullName(<hidden>) should be <first> <last> with one space

Sign in to open this drill