Using Java
2. In a different java file (for example FunWithNames.java) convert the following pseudocode to Java code. Please remember to make your solution generic (call length method to get the number of characters in the String: call indexof method to compute the index of a character) and the output "user friendly" Example 3.6 may be helpful: a Store your name (frst and last together separated by one space ie. "Mary Flower) in a String b. Display myFullName in all upper case, display myFullName in all lower case, and next display the c. Display the number of characters in the myFullName object (ie. My name is Mary Flower and it is 11 d. Extract the first name from the myFulIName object and store it in the myFirstName String object object referenced by the reference variable myFullName. original myFullName. characters long) (utilize indexof method to compute index of space and use this information in the call to e. Extract the last name from the myFullName object and store it in the myLastName String object (use f. Display myLastName followed by comma followed by myFirstName (ie. My inverted name is g. Store your friend's name (first, middle, and last together separated by one space ie "John Henry h. Display number of characters in the friendsFullName object (ie. My friend's name is John Henry Smith i Extract the first name initial from the friendsFullName object and store it in the j Extract the last name initial from the friendsFullName object and store it in the k. Display a message showing yours and your friend's initials (ie. MF and JS are friends) substring) a similar technique as above) Flower Mary) Smith") in a string object referenced by the reference variable friendsFullName. and it is 16 characters long) friendsFirstNamelnitial char friendsLastNamelnitial char (utilize lastIndexof method to get the index of the last space)