kopi house
Friday, March 20, 2009
  Fun with Groovy
My colleague had a great idea for groovy's implementation

def list = []
while (list.size()<6) {
def num = new Random().nextInt(45)+1
if (!list.contains(num)) list << num
}
println list

This will be my most-used groovy script. :D

Labels: ,

 
Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Name:

Why kopi house? The word kopi means coffee in our dialect and since Java symbolic icon is a cup of coffee, so this is why I named my blog as kopi house (Java with local favour) ; )

Archives
December 2007 / May 2008 / February 2009 / March 2009 / August 2009 /


Powered by Blogger

Subscribe to
Posts [Atom]