Valid Java code that is NOT valid Groovy code?

后端 未结 8 2059
忘了有多久
忘了有多久 2020-12-05 04:50

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

8条回答
  •  醉梦人生
    2020-12-05 05:41

    Has anyone mention the difference in ==? I took this is from Grails documentation.

    == means equals on all types. In Java there's a wierd part of the syntax where == means equality for primitive types and == means identity for objects.

提交回复
热议问题