Java is not a subset of Groovy. Some syntax valid in both will behave differently in each, e.g. default visibility, and how == behaves.