Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

3-D Array

 
Vilpesh Mistry
Ranch Hand
Posts: 62
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to add data in a 3-d array in java.

I have hard coded & stored the data as
double mydetails[][][] = new double[][][]{ ( {0.1,0.2 },{0.5} }, ( {0.1,0.2 },{0.5} }, ( {0.1,0.2 },{0.5} } }

Now i do not want to hard code the real data but fill in the data dynamically so how do i do that

thanks
 
Giovanni De Stefano
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This seems to be a question for the beginner forum more than the intermediate.
BTW if you are having hard time figuring out how to actually access, read and/or modify the elements in the n-dimensional array, and you have no time to try on your own, here is a code snippet that might help you out:


Giovanni
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic