Results 1 to 6 of 6

Thread: Symbols [][].

  1. #1
    Nightshade93 is offline Member
    Join Date
    Aug 2014
    Posts
    4
    Rep Power
    0

    Default Symbols [][].

    I know that [] is an array, but I am confused as to what exactly [][] is. If it is still an array, what is the difference?

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default Re: Symbols [][].

    It is a 2 dimensional array.

  3. #3
    Nightshade93 is offline Member
    Join Date
    Aug 2014
    Posts
    4
    Rep Power
    0

    Default Re: Symbols [][].

    Thank you. That means that instead of having a single line like [0, 1, 2, 3, 4, 5], it would be
    [0, 0, 0, 0, 0]
    [1, 1, 1, 1, 1]
    [2, 2, 2, 2, 2]
    [3, 3, 3, 3, 3]

  4. #4
    Nightshade93 is offline Member
    Join Date
    Aug 2014
    Posts
    4
    Rep Power
    0

    Default Re: Symbols [][].

    Thank you. That means that instead of having a single line like [0, 1, 2, 3, 4, 5], it would be
    [0, 0, 0, 0, 0]
    [1, 1, 1, 1, 1]
    [2, 2, 2, 2, 2]
    [3, 3, 3, 3, 3]
    right?

  5. #5
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default Re: Symbols [][].

    Correct.

    Even though the common term is 2D array it is actually an array of arrays. If I had a 2D array then {0,0,0,0} would be the first element of that array, {1,1,1,1} would be the second element of that array etc. You can even have uneven (jagged) arrays:
    {1,2,3}
    {1,2,3,4,5,6}
    {1,2,3,4}

  6. #6
    Nightshade93 is offline Member
    Join Date
    Aug 2014
    Posts
    4
    Rep Power
    0

Similar Threads

  1. Balanced Symbols
    By superhaNds in forum New To Java
    Replies: 10
    Last Post: 11-20-2013, 12:57 AM
  2. regex for symbols
    By wildheart25c in forum New To Java
    Replies: 2
    Last Post: 08-01-2012, 07:38 AM
  3. Representing ERD with symbols
    By vivvy in forum JDBC
    Replies: 1
    Last Post: 02-17-2010, 06:17 PM
  4. Plotting Symbols in Java 2D
    By cowboy007 in forum Java 2D
    Replies: 1
    Last Post: 03-08-2009, 02:13 PM
  5. How to cut symbols from a string?
    By gutters in forum New To Java
    Replies: 3
    Last Post: 06-16-2008, 04:47 AM

Tags for this Thread

Posting Permissions

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