Translate

Wednesday, 6 October 2021

Compile Time Meta Programming @Immutable in Groovy Scripting groovy training telugu 55

 Watch This Video


https://youtu.be/0kVxTGqSdrg

------------------------------------------------------------------------------------




//Person.groovy
package Immutable

import groovy.transform.Immutable
import groovy.transform.ToString


@ToString
@Immutable
class Person {
    String first
    String last

}


//app.groovy
package Immutable
Person p= new Person(first:"Dan",last:"vega")
println p.toString()

p.first ="Andy"

No comments:

Post a Comment

Note: only a member of this blog may post a comment.