Clean a Contact name
Apex String methods such as trim and capitalize turn messy imported text into clean names.
Your task
Clean two imported Contact names: trim the spaces, fix the capital letters, and drop the __temp suffix.
String firstName = ' maya ';
String lastName = 'Chen__temp';
// Case A: maya / Chen
// Case B: LUCIA / Lopez
firstName = ' LUCIA ';
lastName = 'Lopez__temp';Requirements
trim()should be usedcapitalize()should be usedremoveEnd,removeorreplaceshould be used on'__temp'First: Mayashould be printedLast: Chenshould be printedFull: Maya Chenshould be printedSecond full: Lucia Lopezshould be printed