Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Multidimensional array uses

  1. #1
    Member
    Join Date
    Feb 2013
    Location
    Canada
    Posts
    54
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Default Multidimensional array uses

    Multidimensional arrays can have any number of dimensions to them, from int[][] to int[][][][]. I understand how a multidimensional array with 2, 3 and 4 dimensions can be used practically but what are the practical uses to multidimensional arrays such as, int[][][][][][][][] test; ? Also, is there a limit as to how many dimensions an array could have, or could 1 multidimensional array of, say, 50 dimensions, be so large it crashes the IDE (or even the computer)?


  2. #2
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 263 Times in 232 Posts

    Default Re: Multidimensional array uses

    Quote Originally Posted by SunshineInABag View Post
    ...be so large it crashes the IDE (or even the computer)?
    pretty much.. The JVM should prevent the computer from crashing if your program gets memory hungry.

  3. #3
    Member
    Join Date
    Jan 2024
    Posts
    75
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default Re: Multidimensional array uses

    Think of a multidimensional array like a big box with lots of smaller boxes inside it. Each dimension of the array adds another layer of smaller boxes. So, if you have a really huge array with lots of dimensions, it's like having a massive box filled with tiny boxes inside, where each tiny box can hold a piece of information. While you can technically make the array as big as you want, putting too many layers of boxes can make your program slow or even run out of space, like trying to fit too many things into a small room. So, while it's possible to have a gigantic array, it's important to be mindful of how much space it might take up and whether your computer can handle it without crashing. If you want to learn more about programming concepts like arrays and their practical uses, you can visit our website for helpful resources https://www.programminghomeworkhelp....va-assignment/.

Similar Threads

  1. types in a multidimensional array
    By hannah87 in forum Java Theory & Questions
    Replies: 1
    Last Post: February 22nd, 2013, 08:23 AM
  2. [SOLVED] adding to a multidimensional array.
    By Scotty in forum What's Wrong With My Code?
    Replies: 3
    Last Post: March 27th, 2011, 10:09 AM
  3. multidimensional array 'advancing'?
    By kitube in forum Java Theory & Questions
    Replies: 5
    Last Post: January 25th, 2011, 02:23 PM
  4. Need help in multidimensional array
    By Stefan_Lam in forum Algorithms & Recursion
    Replies: 3
    Last Post: January 14th, 2010, 08:52 PM
  5. Looping through a multidimensional array
    By MysticDeath in forum Loops & Control Statements
    Replies: 2
    Last Post: October 11th, 2009, 05:41 PM