Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
    Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Lots of Groovy examples can be found at the Groovy home page http://groovy.codehaus.org/, for example

  • http://groovy.codehaus.org/Cookbook+Examples
  • http://groovy.codehaus.org/User+Guide
  • http://groovy.codehaus.org/Advanced+Usage+Guide
  • http://pleac.sourceforge.net/pleac_groovy/index.html
  • and the Gina examples: http://www.manning.com/koenig/Groovy-in-Action-source-code.zip
  • Gaelyk is a lightweight Groovy toolkit for Google App Engine Java.
  • Improving Java with Groovy. http://www.infoq.com/presentations/Improve-Your-Java-with-Groovy


  • Questions about Groovy can be asked in the JavaRanch Groovy forum.


    An example

    To start with, here are two versions of a short Groovy program that solves the first problem of Project Euler : If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum of all the multiples of 3 or 5 below 1000.




    Both would be called using println getSumOfMultiples([3,5], 1000)


    CategoryLearnSomethingNew GroovyFaq
     
    You showed up just in time for the waffles! And this tiny ad:
    Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
      Bookmark Topic Watch Topic
    • New Topic