Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7929489
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T20:05:42+00:00 2026-06-03T20:05:42+00:00

I am new to Java and trying to learn the various collections that programmers

  • 0

I am new to Java and trying to learn the various collections that programmers can use. I imported “java.util” into a scrapbook in Eclipse and inspected the following code.

ArrayList<String> list = new ArrayList<String>();
list.add("test1");
list.add("test2");

I receive this output.

The type ArrayList is not generic; it cannot be parameterized with arguments <String>
Syntax error, parameterized types are only available if source level is 5.0
The type ArrayList is not generic; it cannot be parameterized with arguments <String>
Syntax error, parameterized types are only available if source level is 5.0

What does this error mean? I did not make a generic array list; I made an array list of strings. Furthermore, what is “source level”?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T20:05:44+00:00Added an answer on June 3, 2026 at 8:05 pm

    Your Java version in Eclipse is set to 1.4, generics in java were introduced only in Java 5.

    Change your JDK to 1.5 or above in eclipse that will resolve this issue.

    You can check your JDK by Project - > Java Build Path - > Libraries

    If here you see it being Java 1.5 or above then check the compiler Compliance is set to 5 and above.

    You can check that Project - > Java Compiler

    EDIT:

    To add new jdk to Eclipse

    Right click on Project – > Java Build Path – > Libraries – > Add Libraries – > JRE System Library – > Installed Libraries – > Add – > Standard VM – > Provide your installation location and press OK

    Note in the list of Installed JRE, ensure that you check your Java 7.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to learn to use xml in Java (Android platform, using Eclipse and
I'm trying to learn some Android and java programming in Eclipse. I can run
I am trying to learn a java-based program, but I am pretty new to
Hey I'm new to java servlets and I am trying to write one that
I'm pretty new to Java ME and i'm trying to use Microlog to handle
i am trying to learn Java, Hibernate and the MVC pattern. Following various tutorial
I am still new to Java and Eclipse and I'm trying to get my
I'm trying to build a new java swing component, I realise that I might
I am new to android/java and currently am trying to learn custom events and
I'm new to Java-based web programming and am trying to learn JSF from the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.