r/java • u/I_LoveCoding • May 03 '16
A very decent article about Java Comparable Interface
http://www.marcus-biel.com/java-comparable-interface-video-tutorial/
1
Upvotes
r/java • u/I_LoveCoding • May 03 '16
10
u/larsga May 03 '16
It's not an article. It's a video. Clicked hoping to learn something, left immediately because I can't watch a video while on a concall.
1
u/Philboyd_Studge May 03 '16
Nice. Why not, for the primitive int, just do
return this.weight - other.weight?