Компилятор ругается на синтаксис 32 строки ?
com/javarush/task/task07/task0713/Solution.java:32: error: illegal start of expression
public static void printList(ArrayList<Integer> list) {
^
что это, кто знает?
package com.javarush.task.task07.task0713;
import java.util.ArrayList;
/*
Играем в Jолушку
*/
import java.util.*;
public class Solution {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
ArrayList<Integer> fathers = new ArrayList<Integer>();
ArrayList<Integer> thou0 = new ArrayList<Integer>();
ArrayList<Integer> thou2 = new ArrayList<Integer>();
ArrayList<Integer> thou3 = new ArrayList<Integer>();
for(int i = 0; i < 20; i++){
fathers.add(sc.nextInt);
if(fathers.get(i) == 0 ) thou0.add(fathers.get(i));
else{
if(fathers.get(i)%2 == 0)thou2.add(fathers.get(i));
if(fathers.get(i)%3 == 0)thou3.add(fathers.get(i));
if(fathers.get(i)%2>0 && fathers.get(i)%3>0 ) thou0.add(fathers.get(i));
}
printList(fathers);
printList(thou2);
printList(thou3);
printList(thou0);
}
public static void printList(ArrayList<Integer> list) {
for(int j = 0; j < list.size(); j++){
Sistem.out.printList(list.get(j));
}
}
}