Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to set IntelliJ IDEA to support lambda expressions

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to set up IntelliJ IDEA to support lambda expression, the article is very detailed, has a certain reference value, interested friends must read it!

Using IntelliJ IDEA as a development tool, for maven-based java projects, if you want to write lambda expressions, make sure that jdk1.8 or higher is installed and used, and then make some settings before you can compile and execute normally, as shown in maven support and intellij idea tool support. The configuration is as follows:

# # maven supports # # add a plug-in to pom.xml to make maven support jdk1.8 syntax:

Org.apache.maven.plugins maven-compiler-plugin 3.2 1.8 1.8 modify one of the intellij idea configurations: modify the global settings of intellij # #

Next is the global settings for intellij. Select the global settings in the menu, as shown in the red box below:

In the pop-up menu, set the level of Java compiler to 1.8.The specific settings are shown in the red box below:

Modify intellij idea configuration II: modify project configuration # #

Then, the attributes of the project project support lambda. Right-click on the project and select "Open Modular Settings", as shown below:

Select "8-Lambdas" from the language level in the pop-up menu, as shown below:

Complete and use

After these settings are completed, the lambda expression can be written in the code, and ide will automatically prompt, as shown in the following figure:

The above is all the content of the article "how to set IntelliJ IDEA to support lambda expressions". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report