Question: Given string currLocation on one line and string currState on a second line, append a comma and a space to currLocation. Then, append currState to

Given string currLocation on one line and string currState on a second line, append a comma and a space to currLocation. Then, append currState to currLocation. Ex: If the input is: Columbus Ohio then the output is: Columbus, Ohio

Given string currLocation on one line and string currState on a second

PLEASE ANSWER IN JAVA THANK YOU

zyBooks My library > CIS 176: Java Programming I home >5.16 : String access operations zyBooks catalog 444740.2644232.92229y7 Jump to level 1 Given string currLocation on one line and string currState on a second line, append a comma and a space to currLocation. Then, append currState to currLocation. Ex: If the input is: Columbus Ohio then the output is: Columbus, Ohio \begin{tabular}{l|l} 1 & import java.util. Scanner; \\ 2 & public class ConcatenateString \{ \\ 3 & public static void main(String [] args) \{ \\ 4 & Scanner scnr = new Scanner(System.in); \\ 5 & String currLocation; \\ 6 & String currState; \\ 7 & \\ 8 & \\ 9 & currlocation = scnr. nextLine(); \\ 10 & currState = scnr.nextLine(); \\ 11 & \\ 12 & Your code goes here */ \\ 13 & \\ 14 & System.out.println(currlocation); \\ 15 & \} \\ 16 & \end{tabular}

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!