In this code we first create a class name as “Name”. This name class contain a constructor. This constructor is receiving a parameter then this parameter value attaches the name variable also the class contain the ‘present’ function. This function responsible to return the full attach value. Now call the function by creating object of the class.