











When I try to use the expression value -> value
I get an error that says that Lambda is not supported. I am currently using the 1.8 JDK with Lambda support, but I still get the error. My guess is that it is IntelliJ 13.1.4 but I'm not positive.
public static void grades(){
final List<Integer> grade = new ArrayList<Integer>();
int gradelistnumber = 1;
int inputedgrade = 0;
while(inputedgrade != -1){
System.out.println("Enter Grade for student " gradelistnumber " (1-50): ");
inputedgrade = sc.nextInt();
grade.add(inputedgrade);
gradelistnumber ;
}
System.out.println("Class Average: " System.out.println(grade.stream().mapToInt(value -> value /*error*/).sum()));
}
}
In addition to File > Project Structure > Project > Project Language Level
as other has mention,
you should also check File > Project Structure > **Modules** > Sources > Project Language Level
and set to 8