File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

3-D Array

 
Vilpesh Mistry
Ranch Hand
Posts: 62
Eclipse IDE Java
  • 0
  • 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: 154
  • 0
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic