Question: I don't know what im doing wrong Write a program that leads a persons tilst and last names, separated by a space. Then the program

 I don't know what im doing wrong Write a program thatleads a persons tilst and last names, separated by a space. Then

I don't know what im doing wrong

Write a program that leads a persons tilst 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 import java.util.Scanner; 1 test passed public class SpaceReplace { public static void main(String[] args) { Scanner scnr = new Scanner(System.in); String firstName; String lastName; All tests passed firstName = "Maya"; lastName = "Jones"; System.out.print(lastName + ", " + firstName); 14 15 } } Run X Testing with: Maya Jones Run Run x Testing with: Maya Jones Output is nearly correct; but whitespace differs. See highlights below. Special character legend Your output Jones, Maya Expected output Jones, Maya X Testing with: Stan Li Output differs. See highlights below. Special character legend Your output Jones, Maya Expected output Li, Stan

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!