ApexSensei

Drills Apex basics

Quick win: shout it

toUpperCase() returns a new copy of the text in capital letters.

Your task

Fill in the body of shout so it returns text.toUpperCase() + '!'.

String shout(String text) {
    return null;
}

Requirements

  1. shout('hi') should be HI!
  2. shout('Apex') should be APEX!
  3. shout('OK') should be OK!
  4. shout(<hidden>) should be the input in capitals plus !

Sign in to open this drill