Skip to content

Commit e5ab452

Browse files
committed
comparator this one, before commit it was comparable
1 parent f207d1d commit e5ab452

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/CollectionsFramework/Day_4/ComparableComparatorExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ public static void main(String[] args) {
4141

4242
/**
4343
* comparator
44-
*
44+
* // Sort ascending by marks using Comparator
45+
* students.sort((s1, s2) -> s1.marks - s2.marks);
4546
*/
4647

4748
}

0 commit comments

Comments
 (0)