Answer:
Following are the program in Java language
import java.util.*; // import package
public class Main // main function
{
public static void main(String[] args) // main class
{
String l_name,f_name; // variable declaration
Scanner sc6=new Scanner(System.in); // scanner class
f_name= sc6.next(); // Read input
l_name=sc6.next(); // Read input
System.out.print(l_name); // display last name
System.out.print(","); // display comma
System.out.println(f_name); // display first name
}
}
Output:
Maya Jones
Jones, Maya
Explanation:
Following are the description of program