My program won't compile, getting the following error:
com/codegym/task/task05/task0532/Solution.java:26: error: <identifier> expected
System.out.println(maximum);
I don't understand the issue and can't move forward with solving. Please help!
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());
if (n>0){
for (int i=0; i < n; i++){
int a = Integer.parseInt(reader.readLine());
if (maximum < a){
maximum = a;
}
}
if (maximum <n)
maximum = n;
}
}//write your code here
System.out.println(maximum);
}
}