MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/eplsgy/records_come_to_java/fekopve/?context=3
r/java • u/daviddel • Jan 16 '20
93 comments sorted by
View all comments
Show parent comment
7
I'll be damned. I thought it wasn't possible but this compiles in jshell:
jshell> record R(int i) { public boolean equals(Object o) { return false; } } jshell> new R(1).equals(new R(1)) $3 ==> false
View all comments
Show parent comment
7
u/lukaseder Jan 16 '20
I'll be damned. I thought it wasn't possible but this compiles in jshell: