Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2011
    Posts
    6
    Rep Power
    0

    Post two dimensional array

    actually i am having a doubt in two dimensional array.
    dear frnds,
    i want to know how "two dimensional array" works?
    how the "two dimensional array" executes step by step?
    i will be grateful to u if anybody help me to clarify this doubt.
    Last edited by sunde887; 10-05-2011 at 05:43 AM. Reason: Don't bold everything

  2. #2
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,641
    Rep Power
    7

    Default Re: two dimensional array

    A two-dimensional array doesn't 'execute step by step'. It is an array of arrays. See the following link, and you might wish to post an example piece of code to demonstrate your confusion:

    Arrays (The Java™ Tutorials > Learning the Java Language > Language Basics)

  3. #3
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default Re: two dimensional array

    As doWhile said, a 2D array is simply an array such that each element is another array. Similarly, a 2D array is processed in much the same way as a single dimensioned array.

    For each element in the array, print it. Since each element in the array is another array, you would need nested loops to cycle through it all. Try setting up some snippets to show yourself how they are processed. It's surprisingly simple.

Similar Threads

  1. Help with Two Dimensional Array
    By johnjacob in forum New To Java
    Replies: 2
    Last Post: 06-03-2011, 09:22 PM
  2. 2 dimensional array
    By sehudson in forum New To Java
    Replies: 5
    Last Post: 02-21-2011, 12:56 AM
  3. 2 dimensional array help!
    By ber1023 in forum New To Java
    Replies: 9
    Last Post: 01-02-2011, 01:29 AM
  4. Two dimensional array
    By niu_niu in forum New To Java
    Replies: 4
    Last Post: 06-13-2010, 01:34 AM
  5. two-dimensional array
    By kHim in forum New To Java
    Replies: 4
    Last Post: 11-16-2008, 08:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •