Advertisement
veronikaaa86

05. Concat Names

May 25th, 2022
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. package dataTypesAndVariables;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class P05ConcatNames {
  6. public static void main(String[] args) {
  7. Scanner scanner = new Scanner(System.in);
  8.  
  9. String firstName = scanner.nextLine();
  10. String secondName = scanner.nextLine();
  11. String delimiter = scanner.nextLine();
  12.  
  13. System.out.println(firstName + delimiter + secondName);
  14. }
  15. }
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement