Results 1 to 2 of 2
Thread: Creating Array of LinkedList
- 12-11-2007, 08:09 AM #1
Member
- Join Date
- Dec 2007
- Posts
- 1
- Rep Power
- 0
Creating Array of LinkedList
Hi friends,
I want to create an array of LinkedList using generic class.
I tried following Code
LinkedList<Integer> [] Cards=new LinkedList<Integer>[Shuffles];
It Showed Generic array creation Error.
when I changed it to
LinkedList<Integer> [] Cards=new LinkedList[Shuffles];
Error Changed into Warning and I could run it in my machine.
Now problem is I am participating online competition where I have to submit code to Online Judge. They wont allow any warning. I want to create Array of Linked List without any warning,
- 12-11-2007, 10:25 AM #2
Senior Member
- Join Date
- Nov 2007
- Location
- Newport, WA
- Posts
- 141
- Rep Power
- 0
There are quite a few problems with what you are saying. Here is all the information about it:
Generics - Generic Arrays - No more unsound than Generics in general
Its a well known issue.
Similar Threads
-
Creating an array of nonprimitive objects
By Java Tip in forum java.langReplies: 0Last Post: 04-14-2008, 08:46 PM -
Need help with creating array of type object
By riz618 in forum New To JavaReplies: 3Last Post: 01-29-2008, 06:14 AM -
Creating an ArrayList from an existing LinkedList
By Java Tip in forum Java TipReplies: 0Last Post: 12-05-2007, 02:09 PM -
creating array at runtime
By javaplus in forum New To JavaReplies: 4Last Post: 11-08-2007, 10:06 PM -
how to use LinkedList
By fred in forum Advanced JavaReplies: 1Last Post: 07-24-2007, 01:52 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks