Didart

Concat Names

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