MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/eplsgy/records_come_to_java/fenwag4/?context=3
r/java • u/daviddel • Jan 16 '20
93 comments sorted by
View all comments
2
Will it be fluent? Something like:
var user = new User().id(1L).lastName("Doe").firstName("John");
2 u/dany74q Jan 17 '20 Nope, the compiler will generate a public ctor with all of the fields, and accessors for each field; No setters will be created as records are immutable. 1 u/jvjupiter Jan 17 '20 I see. Thank you.
Nope, the compiler will generate a public ctor with all of the fields, and accessors for each field; No setters will be created as records are immutable.
1 u/jvjupiter Jan 17 '20 I see. Thank you.
1
I see. Thank you.
2
u/jvjupiter Jan 17 '20 edited Jan 17 '20
Will it be fluent? Something like:
var user = new User().id(1L).lastName("Doe").firstName("John");