1String line = scanner.nextLine();
2int age = Integer.parseInt(line); // Exception-t
1int age = scanner.nextInt();
2scanner.nextLine(); //Ez fogja az ottmaradt sorvége jelet beolvasni
3
4String name = scanner.nextLine();
1Scanner scanner = new Scanner(System.in);
2
3System.out.println("What's your name?");
4String name = scanner.nextLine();
5
6System.out.println("What's your year of birth?");
7int yearOfBirth = scanner.nextInt();