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

Given string userDate on one line and string currYear on a second line, append a comma and a space to userDate. Then, append currYear to userDate.
Ex: If the input is:
April 13
2013
then the output is:
April 13,2013import java.util.Scanner;
public class StringConcatenate {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
String userDate;
String currYear;
userDate = scnr.nextLine();
currYear = scnr.nextLine();
/* Your code goes here */
System.out.println(userDate);
}
}

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!