on 07-03-2014 5:57 PM
Hi,
When I past the Setting properties List<String> tags = Arrays.asList("Hello", "Tutorial"); in the Eclipse I have this error:
The type List is not generic; it cannot be parameterized with arguments <String> HelloWorldServlet.java /hello-world/src/com/sap/cloud/sample/helloworld line 98 Java Problem
Why?
Weides
Hi Weides...
Maybe, accidently, when you first hit "organize imports" after you pasted that code fragment, and you were asked which "List" you want to import most probably you selected java.awt.List (In java you have at least the awt list and the java.util.List)
Now... do the following:
1. Delete the import statement of import java.awt.List and delete the import java.util.List
2. Put back List<String>
3. Then, Organize Imports again , and when it prompted for the choice, choose java.util.List.
I hope that works for you.
Regards.
(PD. Useful checks will be appreciated)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like you have imported the wrong List class. Ensure that it is java.util.List.
Cheers,
--Vlado
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.