Every condition have passed except displaying max, however on the console it gets displayed yet the condition is not met. Can anyone help me to understand why it is not accepted?
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;
int N = Integer.parseInt(reader.readLine());
//write your code here
for(int i = 0; i < N; i++){
int a = Integer.parseInt(reader.readLine());
maximum = a > maximum ? a:maximum;
}
//turns int to string
Integer m = maximum;
String max = m.toString();
//checks N and displays nothing if true
if(N<=0){
max = "";
}
System.out.println(max);
}
}