MENU

Fun & Interesting

Why comparable and comparator is needed || Need of Comparable and Comparator in Java

Code Decode 116,266 lượt xem 4 years ago
Video Not Working? Fix It Now

In this video we will se why comparable and comparator is need in java.

Udemy Course of Code Decode on Microservice k8s AWS CICD link:
https://openinapp.co/udemycourse

Course Description Video :
https://yt.openinapp.co/dmjvd

#comparable #comparator #comparablevscomparator

In next videos we will -
- Comparable and Comparable in Java
- Difference between Comparator and Comparable
- Example of Comparator and Comparable
- Create getters and setters
- toString() method
- Creating List and adding values in List
- Collection.sort method to sort the List
- When to use Comparable and when to use Comparator
- compareTo() method
- How to use comparable
- How to use Comparator

why is comparable and comparator needed at all in java is what we will answer here.


Also watch
Equals and hashcode contract : https://youtu.be/4X5Kgi2VltI

-------------------------------------------------------------------------------------------------------------------------------------

Code Decode Playlists

Most Asked Core Java Interview Questions and Answers : https://youtube.com/playlist?list=PLyHJZXNdCXscoyL5XEZoHHZ86_6h3GWE1

Advance Java Interview Questions and Answers : https://youtube.com/playlist?list=PLyHJZXNdCXsexOO1VQ4vs-BM2-8CKrixd

Java 8 Interview Questions and Answers : https://youtube.com/playlist?list=PLyHJZXNdCXsdeusn4OM33415DCMQ6sUKy

Hibernate Interview Questions and Answers : https://youtube.com/playlist?list=PLyHJZXNdCXsdC-p2186C6NO4FpadnCC_q

Spring Boot Interview Questions and Answers : https://youtube.com/playlist?list=PLyHJZXNdCXsexOO1VQ4vs-BM2-8CKrixd

Angular Playlist : https://www.youtube.com/watch?v=CAl7RQSdq2Q&list=PLyHJZXNdCXsfxRtDwtGkDD_lLfTWc1g0i

GIT : https://youtube.com/playlist?list=PLyHJZXNdCXscpl6pxOnL2lRWJlzvzjyZE

-------------------------------------------------------------------------------------------------------------------------------------
Subscriber and Follow Code Decode

Subscriber Code Decode : https://www.youtube.com/c/CodeDecode?sub_confirmation=1

Linkedin : https://www.linkedin.com/in/codedecodeyoutube/

Instagram : https://www.instagram.com/codedecode25/

--------------------------------------------------------------------------------------------------------------------------------------

Comment