Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-11-2007, 10:09 AM
Member
 
Join Date: Dec 2007
Posts: 1
sasikumardr is on a distinguished road
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,
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-11-2007, 12:25 PM
Senior Member
 
Join Date: Nov 2007
Location: Newport, WA
Posts: 141
staykovmarin is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating an array of nonprimitive objects Java Tip java.lang 0 04-14-2008 10:46 PM
Need help with creating array of type object riz618 New To Java 3 01-29-2008 08:14 AM
Creating an ArrayList from an existing LinkedList Java Tip Java Tips 0 12-05-2007 04:09 PM
creating array at runtime javaplus New To Java 4 11-09-2007 12:06 AM
how to use LinkedList fred Advanced Java 1 07-24-2007 03:52 AM


All times are GMT +3. The time now is 04:10 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org