Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Concatenate {
- public static void main(String[] args) {
- Scanner myScan = new Scanner(System.in);
- String name = myScan.nextLine();
- String lastName = myScan.nextLine();
- int age = Integer.parseInt(myScan.nextLine());
- String town = myScan.nextLine();
- System.out.printf("You are %s %s, a %s-years old person from %s.", name, lastName, age, town);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment