Interview Question | Comparable vs Comparator in Java

Share this & earn $10
Telusko
Published at : 27 Oct 2021
434054 views
7600
206

In this video we will see :
- Comparator and Comparable in Java
- Difference between Comparator and Comparable
- Example of Comparator and Comparable
- Create getters and setters
- toString() methpd
- 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

#java #interview

Editing Monitors :
https://amzn.to/2RfKWgL
https://amzn.to/2Q665JW
https://amzn.to/2OUP21a.


Check out our website: http://www.telusko.com

Follow Telusko on Twitter: https://twitter.com/navinreddy20

Follow on Facebook:
Telusko : https://www.facebook.com/teluskolearn…
Navin Reddy : https://www.facebook.com/navintelusko

Follow Navin Reddy on Instagram: https://www.instagram.com/navinreddy20

Subscribe to our other channel:
Navin Reddy : https://www.youtube.com/channel/UCxmk…
Telusko Hindi :
https://www.youtube.com/channel/UCitz…


Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
http://www.telusko.com/contactus

teluskonavinreddy

Voyager - Beatnik

Voyager - Beatnik

SlapDee x Bobby - For A Long Time (Official Music Video)

SlapDee x Bobby - For A Long Time (Official Music Video)

What's the difference between ability and skill?

What's the difference between ability and skill?

Here Are The Goals You Should Pursue In Your LIFE - Jordan Peterson Motivation

Here Are The Goals You Should Pursue In Your LIFE - Jordan Peterson Motivation

My Mom Owns a Pop It Store! Giant Pop It and Simple Dimple!

My Mom Owns a Pop It Store! Giant Pop It and Simple Dimple!

Is It Advisable to Invest the Money You Need in 2 Years in Digital Banks?

Is It Advisable to Invest the Money You Need in 2 Years in Digital Banks?

ALL English Tenses in 20 Minutes - Basic English Grammar

ALL English Tenses in 20 Minutes - Basic English Grammar

Fat Joe, Remy Ma - All The Way Up ft. French Montana, Infared (Official Music Video)

Fat Joe, Remy Ma - All The Way Up ft. French Montana, Infared (Official Music Video)

how to connect 12v led to 220v

how to connect 12v led to 220v

Three Days Grace - I Am An Outsider (Audio)

Three Days Grace - I Am An Outsider (Audio)

A Million Dreams | The Greatest Showman (with lyrics)

A Million Dreams | The Greatest Showman (with lyrics)

I invented a candy dispensing iPhone Case (iPhone 13 Pro Max!)

I invented a candy dispensing iPhone Case (iPhone 13 Pro Max!)

Top 10 WORST Behaved Tourists - Kicking Stalagmites?

Top 10 WORST Behaved Tourists - Kicking Stalagmites?

Alborosie ft. Protoje - Strolling (Official Music Video)

Alborosie ft. Protoje - Strolling (Official Music Video)

Playing BATTLEFIELD 2042 with MY GIRLFRIEND! (LIVE)

Playing BATTLEFIELD 2042 with MY GIRLFRIEND! (LIVE)

Kingdom Hearts Simple and Clean by Utada Hikaru 720p HD Audio Boost Remix w/Lyrics in Description

Kingdom Hearts Simple and Clean by Utada Hikaru 720p HD Audio Boost Remix w/Lyrics in Description

Overpowering the Goliaths in Our Lives

Overpowering the Goliaths in Our Lives

Eminem - Not Alike (feat. Royce da 5'9_)(Audio 320kbps) - Kamikaze

Eminem - Not Alike (feat. Royce da 5'9_)(Audio 320kbps) - Kamikaze

Biden deploys additional troops to secure Afghanistan evacuations

Biden deploys additional troops to secure Afghanistan evacuations

Annie - Opportunity (Lyrics) "Now look at me and this opportunity" [Tiktok Song]

Annie - Opportunity (Lyrics) "Now look at me and this opportunity" [Tiktok Song]

I'm A Celebrity... Get Me Out Of Here returns this November!

I'm A Celebrity... Get Me Out Of Here returns this November!

Face2Face 2e Pre-Intermediate DVD 09  Invitations   Making Arrangements

Face2Face 2e Pre-Intermediate DVD 09 Invitations Making Arrangements

STOCK MARKET CRATERS ON YELLEN REMARKS | Buy The Dip?

STOCK MARKET CRATERS ON YELLEN REMARKS | Buy The Dip?

Completing GTA V Without Taking Damage? - No Hit Run Attempts (One Hit KO) #35

Completing GTA V Without Taking Damage? - No Hit Run Attempts (One Hit KO) #35

The Fastest 1440p Monitor - 270Hz Acer Predator

The Fastest 1440p Monitor - 270Hz Acer Predator

#How to Supervise People - Part 1# Supervision and Leadership

#How to Supervise People - Part 1# Supervision and Leadership

Emily King @Emilykingmusic - Every Part

Emily King @Emilykingmusic - Every Part

Physiological Changes During Pregnancy

Physiological Changes During Pregnancy

Primeshock - Worldwide | Q-dance Records | Official Video

Primeshock - Worldwide | Q-dance Records | Official Video

"To Make Use of Water" by Safia Elhillo

"To Make Use of Water" by Safia Elhillo

IPO Share Allotment Process

IPO Share Allotment Process

sheeeeeeeesh, another one (GIM #23)

sheeeeeeeesh, another one (GIM #23)

Sorting Objects and Counting for Kids | Sorting Games for Preschool & Kindergarten | Kids Academy

Sorting Objects and Counting for Kids | Sorting Games for Preschool & Kindergarten | Kids Academy

Other Than

Other Than

Exploring a Massive Abandoned Hotel During a Hurricane

Exploring a Massive Abandoned Hotel During a Hurricane

What A Beautiful Name - Hillsong Worship

What A Beautiful Name - Hillsong Worship

Electronic Music for Studying Concentration | Chill Out Electronic Study Music Instrumental Mix |

Electronic Music for Studying Concentration | Chill Out Electronic Study Music Instrumental Mix |

10 Most Dangerous Bugs In The World

10 Most Dangerous Bugs In The World

JUDGE MATHIS | Plaintidd Says They Had To Move Due To The Defendant's Harassment

JUDGE MATHIS | Plaintidd Says They Had To Move Due To The Defendant's Harassment

[Progressive House] - Hellberg - The Girl (feat. Cozi Zuehlsdorff) [Monstercat Release]

[Progressive House] - Hellberg - The Girl (feat. Cozi Zuehlsdorff) [Monstercat Release]

The Old Guard | Official Trailer | Netflix

The Old Guard | Official Trailer | Netflix

Like Nastya - You Can - Kids Song (Official Music Video)

Like Nastya - You Can - Kids Song (Official Music Video)

How To Select The Correct IronHorse Gearbox For Your Application

How To Select The Correct IronHorse Gearbox For Your Application

SperoachBeatz - Constantly feat. Mayorkun & Peruzzi (Official Video)

SperoachBeatz - Constantly feat. Mayorkun & Peruzzi (Official Video)

School Subjects Song | What Do You Study at School? | Fun Kids English

School Subjects Song | What Do You Study at School? | Fun Kids English

The Integumentary System, Part 1 - Skin Deep: Crash Course A&P #6

The Integumentary System, Part 1 - Skin Deep: Crash Course A&P #6

Additional 5 Mh/s Hashrate per GPU with this STICKER?

Additional 5 Mh/s Hashrate per GPU with this STICKER?

This is OUR universe. can you comprehend it.(HQ)

This is OUR universe. can you comprehend it.(HQ)

Overcharged Battery Charges Up to Six Pc || Battery Charging Animation

Overcharged Battery Charges Up to Six Pc || Battery Charging Animation