Could someone explain me why the error occurs when I run my code ?
(edit : line 16 is of course: while (wprowadzonaLiczba != -1).
(pl/codegym/task/task05/task0507/Solution.java:9: error: cannot find symbol
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
^
symbol: class BufferedReader
location: class pl.codegym.task.task05.task0507.Solution)
package pl.codegym.task.task05.task0507;
/*
Średnia arytmetyczna
*/
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int wprowadzonaLiczba;
List<Integer>liczby = new ArrayList<Integer>();
int wynik;
int srednia;
int ilośćLiczb;
while(wprowadzonaLiczba == -1){
wprowadzonaLiczba = Integer.parseInt(reader.readLine());
liczby.add(wprowadzonaLiczba);
wynik = wprowadzonaLiczba+poprzednioWprowadzonaLiczba;
wprowadzonaLiczba = poprzednioWprowadzonaLiczba;
}
ilośćLiczb = liczby.length();
return srednia = wynik / ilośćLiczb;
}
}