Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger
  • Mark post as helpful
  • send pies
  • Report post to moderator
Lots of Groovy examples can be found at the Groovy home page, for example

  • and the Gina examples:
  • Gaelyk is a lightweight Groovy toolkit for Google App Engine Java.
  • Improving 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
    Won't you please? Please won't you be my neighbor? - Fred Rogers. Tiny ad:
    Devious Experiments for a Truly Passive Greenhouse!
      Bookmark Topic Watch Topic
    • New Topic