meteor4o

java-ConcatenateData

Jan 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 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.  
  7. String firstName = scanner.nextLine();
  8. String lastName = scanner.nextLine();
  9. int age = Integer.parseInt(scanner.nextLine());
  10. String town = scanner.nextLine();
  11.  
  12. System.out.printf("You are %s %s, a %s-age old person from %s.", firstName, lastName, age, town);
  13. }
  14. }
Add Comment
Please, Sign In to add comment