Question: java Given string userName on one line and string lastName on a second line, append an underscore to userName. Then, append lastName to userName. Ex:
Given string userName on one line and string lastName on a second line, append an underscore to userName. Then, append lastName to userName. Ex: If the input is: Ron Hill then the output is: Ron_HilL 345678910publicclassConcatenateString{publicstaticvoidmain(StringDargs){Scannerscnr=newScanner(System.in)StringuserName;StringlastName;userName=scnr.nextline();LastName=scnr.nextline()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
