wood burning stoves 2.0*
The moose likes Groovy and the fly likes Very basic question regarding example on p135/136 of the GIA book Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Languages » Groovy
Bookmark "Very basic question regarding example on p135/136 of the GIA book" Watch "Very basic question regarding example on p135/136 of the GIA book" New topic
Author

Very basic question regarding example on p135/136 of the GIA book

Craig Treptow
Greenhorn

Joined: Oct 29, 2007
Posts: 16
Hi. I'm going through the book "Groovy In Action" using Eclipse. On page, 135,136, I wanted to see the benchmark run. So, I have this:

The caller:



and the class:



However, the error I see is:



I'm at a loss. I believe I am passing an Integer and a closure.

What am I missing?

Thanks in advance!

Craig
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Unfortunately, you're also declaring methods in essentially random places.
Craig Treptow
Greenhorn

Joined: Oct 29, 2007
Posts: 16
David Newton wrote:Unfortunately, you're also declaring methods in essentially random places.


Sorry, I'm not following. This is the full content of what I am referring to as the caller:

Aha! I think I see what you mean now.

Caller:



And the class:



Success!

Thanks for making me step away and take another look!

Craig
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

And what I'm saying is that your Chapter5 class is wrong, and the code I posted above isn't. The calling code isn't relevant.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Very basic question regarding example on p135/136 of the GIA book