Advertisement
Spocoman

05. Concat Names

Oct 17th, 2024
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. class Main {
  4.     public static void main(String[] args) {
  5.         Scanner scanner = new Scanner(System.in);
  6.         String firstName = scanner.nextLine(),
  7.             secondName = scanner.nextLine(),
  8.             delimiter = scanner.nextLine();
  9.        
  10.         System.out.println(firstName + delimiter + secondName);
  11.      // System.out.printf("%s%s%s\n", firstName, delimiter, secondName);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement