The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

36069 (1) [Avatar] Offline
#1
At page 203 it is written that Groovy code:

println 'Hello' // Groovy


is converted to bytecode equivalent to:

InvokerHelper.invokeMethod(this, "println", {"Hello"}) ; // Java


It looks to me that the curly brackets enclosing the "Hello" string is a typo.

Mittie (397) [Avatar] Offline
#2
Hi,

this is the literal declaration of an Object array (here String array) in Java.
You may want to try in your Java IDE:
String[] myarr = {"Groovy","in","Action"};

thanks for posting
Dierk