Error: (+) Java: The diamond operator is not supported in-source 1.5 (please use-source 7 or later to enable the diamond operator)

Source: Internet
Author: User

Problem: Mainly because the JDK version is different

Solve:

Method one:list<string> list=new arraylist<stirng> ();

Method Two: Reinstall the version of JDK8 (install and configure environment variables)

File->project structure->modules->language level is selected as version 7, mainly because the JDK version does not support

The following problem occurs after the modification

Problem:

Solve:

Results:

Error: (+) Java: The diamond operator is not supported in-source 1.5 (please use-source 7 or later to enable the diamond operator)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.