aspose file tools
The moose likes Beginning Java and the fly likes How to create an array of arrayList Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "How to create an array of arrayList" Watch "How to create an array of arrayList" New topic
Author

How to create an array of arrayList

neha priya
Ranch Hand

Joined: Jul 03, 2010
Posts: 62
hello everyone,

i want to create an array of arrayList of type EventRow...i tried this


but it is giving the error

am unable to understand this error...please help me suggest me some way by which i can create an array of arrayList of type EventRow
thanks
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32830
    
    4
You can't. I think there is an explanation in the Java™ Tutorials, but I can't remember whether it is in this part or this part.
akhter wahab
Ranch Hand

Joined: Mar 02, 2009
Posts: 151



list is dynamic you can't give its length.


Start Earning Online||Start Earning Using Java
neha priya
Ranch Hand

Joined: Jul 03, 2010
Posts: 62
thanks for the replies...could you please suggest me some way through which i can have a substitute for array of arraylist of type EventRow?

thanks
akhter wahab
Ranch Hand

Joined: Mar 02, 2009
Posts: 151

why you need substitute ?
Prabhakar Reddy Bokka
Ranch Hand

Joined: Jul 26, 2005
Posts: 189

Java 5 does not permit the construction of generic arrays.
Go through the link below.

Generic arrays



SCJP 5, SCWCD 5
neha priya
Ranch Hand

Joined: Jul 03, 2010
Posts: 62
@akhter wahab:thanks for replying..i need a substitute because my implementation demands that...

i am filtering out rows and putting them in an arraylist(say events)...now i am having a hashmap that is declared as


the Integer corresponds to 1st filter,2nd filter,3rd filter and List contains the corresponding filter rows..

so i needed to have an arraylist of type eventrow...i don't know if am able to explain my point clearly.

thanks
akhter wahab
Ranch Hand

Joined: Mar 02, 2009
Posts: 151

read this will clear you alot webpage
neha priya
Ranch Hand

Joined: Jul 03, 2010
Posts: 62
@akhter wahab:thanks for all your help...i somehow solved my problem without creating an array of arrayList

thanks
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to create an array of arrayList
 
Similar Threads
arraylist problem
About creating an array of ArrayList
multidimensional arraylist of JTextFields
ConcurrentLinkedQueue declaration problem
Retrieving values from a HashMap