User input (scanner)
String line = scanner.nextLine();
int age = Integer.parseInt(line); // Exception-t
User input (scanner)
String line = scanner.nextLine();
int age = Integer.parseInt(line); // Exception-t
User input (scanner)
int age = scanner.nextInt();
scanner.nextLine(); //Ez fogja az ottmaradt sorvége jelet beolvasni
String name = scanner.nextLine();
User input (scanner)
Scanner scanner = new Scanner(System.in);
System.out.println("What's your name?");
String name = scanner.nextLine();
System.out.println("What's your year of birth?");
int yearOfBirth = scanner.nextInt();
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us