What can I do in my convertName method to convert the users input to last,first from first last? I have already written the method to determine if it was last,first and if it was, it just returns. If they input first/last, I need to convert to last/first using convertName method, how would I go about doing that?/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package name; /** * * @author student */ import java.util.Scanner; public class Name { public static void main(String[] args) { String haveComma; String finishedName; String hasComma; Scanner reader = new Scanner(System.in); System.out.println("What is your name?"); System.out.println("Ex: Logan Crone or Crone, Logan"); String myName = reader.nextLine(); hasComma(myName, haveComma); convertName (myName, hasComma); // May need conversion if not in First Last format } public static void hasComma (String myName, String haveComma) { String hasCommaName = myName; int doesItHaveComma = hasCommaName.indexOf(','); if (doesItHaveComma > 0){ System.out.println("Last then first! Converting!"); boolean convertMe = true; System.out.println(myName); } } public static void convertName (String myName,String hasComma) { //Oh no! Here because format is first/last, need to convert! String finishedName; } }