Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

double [][] array to arraylist  RSS feed

 
akash pandya
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to display data or double [][] array to html table ,, but before that I have get the array data to arraylist..

Thanks,
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
akash pandya wrote:
I need to display data or double [][] array to html table ,, but before that I have get the array data to arraylist..


Well, do what you have to do!
 
akash pandya
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have array data to display in html table.

double [][] mnthPay = new double [5][4];

I want to get the array data to arraylist and then iterate the data to display in html.

help me with this prb.

I this is not the right way to display then let me know the other way.

Thanks,
 
Lorand Komaromi
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
akash pandya wrote:
I want to get the array data to arraylist and then iterate the data to display in html.


With JSTL's foreach, you can iterate over a multi-dimensional array, no need to convert it into an ArrayList. Here you'll find sample code!
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66187
149
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
akash pandya wrote:help me with this prb.

Prb? What's a "prb"?

Please use real words when posting to the forums. Abbreviations such as "prb" in place of "problem" only serve to make your posts more difficult to read and less likely to generate useful responses.

Please read this for more information.

thanks,
bear
JavaRanch sheriff
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!