There is no difference. Adding defa type definition to the beginning does nothing. However, this is permitted by the parser.
One way to test things like launch this groovyConsole, and start the AST browser (which is for the script)
class Person {
def String name
}
Shows:
public class Person extends java.lang.Object {
private java.lang.String name
}
source
share