jQuery in Action, 2nd edition*
The moose likes Groovy and the fly likes create two-dimensional array in Groovy/grails Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "create two-dimensional array in Groovy/grails" Watch "create two-dimensional array in Groovy/grails" New topic
Author

create two-dimensional array in Groovy/grails

Doug Bell
Greenhorn

Joined: Mar 06, 2012
Posts: 1
I am extreme newbie. I'd like to read in multiple lines and create a two-dimensional array from them. I am using Groovy/Grails with Intellij. Can you show me how to create/update a two-dimentsional character array?

Thanks so much!

Doug Bell
Mohamed Sanaulla
Saloon Keeper

Joined: Sep 08, 2007
Posts: 3054
    
  33

You can create a 2 dimensional array like this def twoDim = [[3,4,5,6],[1,2,4]]. Read more about it here


Mohamed Sanaulla | My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: create two-dimensional array in Groovy/grails
 
Similar Threads
LDAP with Grails
how to do an update an application
how to delete row from Jtable
Turn this Java into Groovy!
Array conversion Question from Dan's test