Problem

Complete the given apex method which accepts two input strings as first name, last name and returns the full name in response.


Instructions:


1. Accept two input parameters as first name and last name in the same order


2. Concatenate the first name and last name with a single space


3. Return the full name in response



Example:


String firstname = 'John';
String lastname = 'Smith';
String result = nameController.concatNames(String firstname, String lastname); //result will be John Smith


Note: String is a primitive data type in apex. Apex provides a set of built in functions to operate on strings. See the official documentation for apex strings and utilize them to solve this scenario.