Can you define a default method for toString or equals and why? It might be attractive for interfaces such as List.
Answer
As a consequence of the “classes win” rule, such a method could never win against Object.toString or Object.equals.
If you want to change selection, open original toplevel document below and click on "Move attachment"
Parent (intermediate) annotation
Open it you can’t define a default method for toString or equals, even though that might be attractive for interfaces such as List. As a consequence of the “classes win” rule, such a method could never win against Object.toString or Object.equals.
Original toplevel document (pdf)
owner: piotr.wasik - (no access) - Java 8 for the Really Impatient (Horstmann), p16
Summary
status
not learned
measured difficulty
37% [default]
last interval [days]
repetition number in this series
0
memorised on
scheduled repetition
scheduled repetition interval
last repetition or drill
Details
No repetitions
Discussion
Do you want to join discussion? Click here to log in or create user.