Any help will be appreciated.

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 , num;
//reads a number n
int n = Integer.parseInt(reader.readLine());
//checks if n > 0
if (n > 0){
//reads n numbers from the keyboard
for (int i=0; i < n; i++){
num = Integer.parseInt(reader.readLine());
//evaluates the maximum
maximum = maximum > num ? maximum : num;
}
//displays the maximum
System.out.println(maximum);
}
}
}

int maximumwith the value 0; But what if you enter the following N numbers: [-4, -8, -19, -99] maximum would never be assigned a new value since no value is higher than 0, so it would just stay 0. But 0 is certainly not the maximum of [-4, -8, -19, -99] ! Initializeint maximumwith the minimum Integer value: