8- Comparable Interface
5:38
2 Репродуценти
2 Глави
128 сегменти
Репродуценти
Глави
-
0:03Глава 1: Earlier I briefly mentioned the comparable interface. 302s · Speaker 1
Earlier I briefly mentioned the comparable interface. We use this interface to compare two objects like two user objects. Now, what is the benefit of this? Well, a lot of sorting algorithms are based on comparing objects. So with these comp…
-
5:06
We can print a message like user1 is smaller than user2. else if user 1 .compared to user 2 equals 0, then we can print user 1 equals user 2. Otherwise, we're going to print user 1 is greater than user 2. Let's run the program. So user 1 is…