Answer:
public static String getNormalOrder(String fname, String lname, String init){
return fname+" "+init+" "+lname;
}
public static String getReversedOrder(String fname, String lname, String init){
return lname+" "+lname+" "+init;
}
Step-by-step explanation:
In java programming language, the two methods are written above
The methods receive as parameters the fname, lname and init representing first name, last name and initials respectively
The first method returns a concatenated string in the correct order as specified by the question
The second method also returns the concatenated string as specified
See a complete code below where all variables are declared and the methods are called
public class ReversingNames {
public static void main(String[] args) {
String fname = "John";
String lname = "Public";
String init = "Q";
//Call getNormalOder
System.out.println(getNormalOrder(fname,lname,init));
//Call getReversedOrder
System.out.println(getReversedOrder(fname,lname,init));
}
public static String getNormalOrder(String fname, String lname, String init){
return fname+" "+init+" "+lname;
}
public static String getReversedOrder(String fname, String lname, String init){
return lname+" "+lname+" "+init;
}
}