A la ligne 30, ca me met illegal start of expression. Je n ai pourtant pas toucher a cette ligne. Un petit coup de main? Merci :)
package fr.codegym.task.task07.task0701;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/*
Maximum dans un tableau
*/
public class Solution {
public static void main(String[] args) throws Exception {
int[] tableau = initialiserTableau();
int max = max(tableau);
System.out.println(max);
}
public static int[] initialiserTableau() throws IOException {
BufferedReader lecteur = new BufferedReader(new InputStreamReader(System.in));
int[] tableau = new int[20];
for (int i = 0; i < tableau.length; i++)
{
String s = lecteur.readLine();
liste[i] = Integer.parseInt(s);
return tableau;
}
public static int max(int[] tableau) {
int max = tableau [0];
for (int i=1; i< tableau.lenght;i++)
{
if (tableau[i]> max)
max = tableau [i];
}
return max;
}
}