Most Java code is also syntactically valid Groovy code. However, there are a few exceptions which leads me to my question:
Which constructs/features in Java are syn
Non-static initialization blocks:
class Foo {
Integer x;
{ x = 1; }
}
UPDATE: This is in fact valid Groovy code.
Declaring an array of a given type using [] after the variable name instead of the type works in Java but not Groovy.
byte[] buff = new byte[1024]; // Works
byte buff[] = new byte[1024]; // Not Groovy
Results in Primitive type literal: byte cannot be used as a method name