Getting java.lang.NumberFormatException in the code
问题 Code : I have TriangleSummer class which has class variable static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); My main function is public static void main(String args[]) throws IOException { int noOfTestCases = Integer.parseInt(reader.readLine()); for(int i=0;i<noOfTestCases;i++){ int noOfEntries = Integer.parseInt(reader.readLine()); System.out.println(computeMaxSum(noOfEntries)); } } Relevant part of my computeMaxSum() method is public static int