Groovy generates getters and setters for class properties. When you leave the modifiers off the field definition, it is actually creating the property as a private field and generating the accessor and mutator methods.
When using Groovy, calling 'g.var' actually calls the accessor (i.e. 'g.getVar()'); it is just allowing you to use the property access style.
If your Java class called 'g.getVar()' it will be able to access the data.
See Groovy Beans for a more lengthy explanation.