aspose file tools*
The moose likes Beginning Java and the fly likes Where i am going wrong in this Array Initializatiion ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Where i am going wrong in this Array Initializatiion ?" Watch "Where i am going wrong in this Array Initializatiion ?" New topic
Author

Where i am going wrong in this Array Initializatiion ?

ashwin bhawsar
Ranch Hand

Joined: Mar 16, 2011
Posts: 62

i am trying to do something like this ( please see the attachment) :

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



[Thumbnail for array.jpg]

ashwin bhawsar
Ranch Hand

Joined: Mar 16, 2011
Posts: 62

Sorry people, really silly problem:

Used : mainArray[][][] =

Instead of: int[][][] mainArray=
Nico Van Brandt
Ranch Hand

Joined: Mar 31, 2011
Posts: 66

For the record, note that it's possible to do:

  • int[][][] mainArray
  • int mainArray[][][]
  • int[] mainArray[][]


  • Oracle Java SE6 Certified Programmer
    Oracle Java EE5 Certified Web Component Developer
    Wouter Oet
    Saloon Keeper

    Joined: Oct 25, 2008
    Posts: 2700

    But it is generally preferred to use int[][][] mainArray;


    "Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
    Please correct my English.
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Where i am going wrong in this Array Initializatiion ?