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…