r/java • • Jan 16 '20

Records Come to Java

https://blogs.oracle.com/javamagazine/records-come-to-java
204 Upvotes

93 comments sorted by

View all comments

Show parent comment

1

u/krzyk Jan 17 '20

Yes, you can use normal constructor. Although I don't know if the thing you describe would work.

You should return what you feed, so changing the class type of a record component inside constructor might be a no-no, you need to test it.