Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
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 06-04-2008, 02:34 PM
M77's Avatar
M77 M77 is offline
Member
 
Join Date: May 2008
Location: LV
Posts: 35
M77 is on a distinguished road
Send a message via Skype™ to M77
2D Array Initialization
Set<Obj>[][] map=new Set<Obj>[20][20];

compiler: generic array creation

What's wrong?
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-04-2008, 02:45 PM
Zosden's Avatar
Senior Member
 
Join Date: Apr 2008
Posts: 386
Zosden is on a distinguished road
You cant use generics with an array because you can only have one object in an array.
__________________
My IP address is 127.0.0.1
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-04-2008, 03:04 PM
sukatoa's Avatar
Senior Member
 
Join Date: Jan 2008
Location: Cebu City, Philippines
Posts: 524
sukatoa is on a distinguished road
Send a message via Yahoo to sukatoa
You may use Hashmap<K,V> instead of that kind of implementation....
__________________
A specific, detailed, simple, well elaborated, and "tested before asking" question may gather more quick replies. hopefully
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-04-2008, 03:12 PM
M77's Avatar
M77 M77 is offline
Member
 
Join Date: May 2008
Location: LV
Posts: 35
M77 is on a distinguished road
Send a message via Skype™ to M77
Set<Obj>[][] map=(Set<Obj>[][])new Set[20][20];
__________________

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
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
variable initialization rqal.10 New To Java 5 06-15-2008 07:39 AM
initialization value problem ravian New To Java 2 01-28-2008 11:54 AM
Icon initialization problem saz25 AWT / Swing 1 12-24-2007 11:37 PM
Lazy Initialization onegcr New To Java 1 08-14-2007 04:29 PM
log4j initialization arfatkhan Web Frameworks 3 08-10-2007 08:42 PM


All times are GMT +3. The time now is 02:43 AM.


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