• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to create an array of arrayList  RSS feed

 
neha priya
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 56546
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 151
Java MyEclipse IDE Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


list is dynamic you can't give its length.
 
neha priya
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 151
Java MyEclipse IDE Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why you need substitute ?
 
Prabhakar Reddy Bokka
Ranch Hand
Posts: 198
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java 5 does not permit the construction of generic arrays.
Go through the link below.

Generic arrays


 
neha priya
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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
Posts: 151
Java MyEclipse IDE Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
read this will clear you alot webpage
 
neha priya
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@akhter wahab:thanks for all your help...i somehow solved my problem without creating an array of arrayList

thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!