Reputation: 5655
Is there any convention like this in groovy
to access member variables
class Emp {
String name
String name1
}
Emp emp = new Emp()
emp {
name = "name"
name1 = "name1"
}
rather than repeating the object again and again
emp.name = "name"
emp.name1 = "name1"
Somewhere I have seen a convention like this
Upvotes: 0
Views: 52