Reputation: 69
i am trying to make an ArrayList of type integer, but it gives me this error(I am using this compiler called jikes) Code:
ArrayList<Integer> = new ArrayList<Integer>();
Error:
***Semantic error: using type arguments to access generic types requires the use of "-source 1.5"'or greater. Compilation will continue to use the raw type "Java.util.arraylist", but no class file will be emitted.
Upvotes: 0
Views: 688
Reputation: 578
Your arraylist has no name:
ArrayList<Integer> name = new ArrayList<>();
Upvotes: 2
Reputation: 509
Correct initialization should be
ArrayList<Integer> X = new ArrayList<Integer>();
you need to assign variable
Upvotes: 0