This is the 19th day of my participation in the August Wenwen Challenge.More challenges in August

@jdk8: @jdK8: @jdK8: @jdK8: @jdK8: @jdK8: @jdK8: @jdK8

1 Problem Description

       / / pseudo code
	    List<User> users = primaryUserMapper.selectList(null);
        List<Integer> collect = users.stream().map(User::getId)
                .collect(Collectors.toList());
Copy the code

In a piece of code that uses a stream stream to process collections, a red flag is sent saying that the current level does not support the syntax and a language version needs to be changed. You are advised to set language level to 8

2 Problem Analysis

According to the error message, the JDK version of the project environment is not applicable and does not support lambda expressions. Therefore, change the JDK environment

3 Problem Solving

1 Click File to enter Project Structure

2 Select Project and set the JDK environment for the Project, such as 1.8. Then set the language level of the Project to 8.

3 Select Modules, select the current module, and set the language login to 8.

4 Finally, go to Settings from File and set the JDK version for IDEA compilation and the module compilation version.

4 summarizes

Like similar IDEA environment problems, or very easy to solve, but temporarily unfamiliar, or will take some time, so record, again next time, immediately solved.