Code example for Scanner

Methods: nextDouble, nextInt, nextLine

0
		this.lastName = lastName;
		this.mark = mark;
	} 
	 
	public void scanInfo() { 
		Scanner scanner = new Scanner(System.in);
		System.out.println("Enter ID: ");
		this.id = scanner.nextInt();
		System.out.println("Enter first name: ");
		this.firstName = scanner.nextLine();
		System.out.println("Enter last name: ");
		this.lastName = scanner.nextLine();
		System.out.println("Enter mark: ");
		this.mark = scanner.nextDouble();
	} 
	 
	public void printInfo() { 
		System.out.printf("%3d|%10s%10s|%5f\n", getId(), getFirstName(), getLastName(), getMark());
	} 
	 
	public String getFirstName() {