Link Details

Link 272305 thumbnail
User 452305 avatar

By fifthposition
via mrhaki.blogspot.com
Published: Oct 30 2009 / 04:30

In Groovy we can set values for properties with a simple assignment using the = operator. Groovy will invoke the set for us. At first sight we might think Groovy sets the variable in the class directly, but that is not true, because the set method is invoked. To get the value of a property we can use dot (.) notation instead of the get method. Let's see this in action in code.
  • 18
  • 1
  • 1283
  • 245

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.