Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

create two-dimensional array in Groovy/grails  RSS feed

 
Doug Bell
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 3174
34
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can create a 2 dimensional array like this def twoDim = [[3,4,5,6],[1,2,4]]. Read more about it here
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!