Please for help, I don't understand what is wrong, i'm getting these error messages?
java.lang.NumberFormatException:
Solution.java, method main, line: 17
Error converting a string to a number (invalid format).
Thank you in advance!!!
package com.codegym.task.task03.task0319;
/*
Predictions
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader scan = new BufferedReader(new InputStreamReader(System.in));
String name = scan.readLine();
String number1 = scan.readLine();
String number2 = scan.readLine();
int n1 = Integer.parseInt(number1);
int n2 = Integer.parseInt(number2);
System.out.println(name + " will receive " + n1 + " in " + n2 + " years.");
}
}