what I'm doing wrong? I'm having a mistake while the program compiles and I don't understand it :/ it says something like : Java.lang.NumberFormatException: null at Java.lang.Integer.parseInt...
package com.codegym.task.task05.task0532;
import java.io.*;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum=0;
while (true) {
int a = Integer.parseInt(reader.readLine());
if (a<1){
break;
} else if(a > maximum){
maximum=a;
}else {}
}
System.out.println(maximum);
}
}