Question: CHALLENGE ACTIVITY 2.10.1: Reading and outputting strings. Write a program that reads a person's first and last names, separated by a space. Then the program
CHALLENGE ACTIVITY 2.10.1: Reading and outputting strings. Write a program that reads a person's first and last names, separated by a space. Then the program outputs last name, comma, first name. End with newline. Example output if the input is: Maya Jones Jones, Maya 1 import java.util.Scanner; 3 public class SpaceReplace public static void main(String[] args) { Scanner scnr = new Scanner(System.in); 6 String firstName; 7 String lastName; DID! 9 /* Your solution goes here */ 12 H Java
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
