Describe even higer dimensions in java, JAVA Programming

Describe even higer dimensions in java?

You don't have to stop along with two dimensional arrays. Java allows arrays of three, four or more dimensions. Therefore chances are pretty good in which if you required more than three dimensions in an array, you're probably by using the wrong data structure. Still three dimensional arrays are exceptionally rare outside of scientific and engineering applications.

The syntax for three dimensional arrays is a direct extension of that for two-dimensional arrays. The program below declares, allocates and initializes a three-dimensional array. The array is filled along with the sum of its indexes.

class Fill3DArray {
   public static void main (String args[]) {
      int[][][] M;
    M = new int[4][5][3];
      for (int row=0; row < 4; row++) {
      for (int col=0; col < 5; col++) {
        for (int ver=0; ver < 3; ver++) {
          M[row][col][ver] = row+col+ver;

You required the additional nested for loop to handle the extra dimension. The syntax for still higher dimensions is same. Just add another pair of brackets and another dimension.

Posted Date: 5/15/2013 3:30:30 AM | Location : United States

Related Discussions:- Describe even higer dimensions in java, Assignment Help, Ask Question on Describe even higer dimensions in java, Get Answer, Expert's Help, Describe even higer dimensions in java Discussions

Write discussion on Describe even higer dimensions in java
Your posts are moderated
Related Questions
State about the performance of java First versions of java were pretty slow. Java performance has gotten a lot better with aggressive just-in-time-compiler (JIT) techniques

Write HTML and JavaScript code which displays a textbox and button on a web page? While user enters text in the text box and clicks the button it displays in that text in the m

1.) Write an application with two user transactions (login which includes viewAllStudents and viewStudent ) with full MVC architecture that displays the details of the selected

Problem Definition A new Met Office web application will allow users of their web site to view rainfall statistics for months and years in the UK. The application allows the m

need help in assignment

State in detail about Java Virtual Machine (JVM) Central part of java platform is java virtual machine Java bytecode executes by special software known as a "virtual machine

I''m having trouble with creating a nested for loop to create a table that displays every number divisible by two within the given value. For example, if the number is 8 then there

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome