• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Where i am going wrong in this Array Initializatiion ?

 
ashwin bhawsar
Ranch Hand
Posts: 62
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am trying to do something like this ( please see the attachment) :

Don't know where i am going wrong in initialization.

array.jpg
[Thumbnail for array.jpg]
 
ashwin bhawsar
Ranch Hand
Posts: 62
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry people, really silly problem:

Used : mainArray[][][] =

Instead of: int[][][] mainArray=
 
Nico Van Brandt
Ranch Hand
Posts: 68
IntelliJ IDE Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For the record, note that it's possible to do:

  • int[][][] mainArray
  • int mainArray[][][]
  • int[] mainArray[][]
  •  
    Wouter Oet
    Saloon Keeper
    Posts: 2700
    IntelliJ IDE Opera
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    But it is generally preferred to use int[][][] mainArray;
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic