Read the summary

Transcript: Java Coding Interview Questions and Answers | Sorting using comparator | Code Decode | [Most Common]

by Code Decode

The video's transcript, taken from its captions. Click a timestamp to play the video from that moment.

0:00 hi guys welcome to code decode today in this video we are going to cover some very frequently asked java coding interview questions from freshers and experienced both so we are going to start with a very commonly asked question that you have to write a comparator in java to compare the list of employees so i'm going to give you the list of employees now you have to sort them or compare them not just based on one single attribute that is id which is a natural sorting you have to sort this single list of employees with

0:31 different comparators who have to use name as a comparison then age and then the custom object that is address inside the custom object that is employee so how will you do that so let's get started and before getting into the theory we'll do it with a practical example but we've already covered comparator and comparable difference compared to and compare method difference difference between custom sorting and natural sorting everything is already covered into your optical way and there is a playlist for that link to that will be given in the description

🔒 The rest of the transcript is available with Pro.

🔒 Unlock Premium Features

Access to Transcript is a premium feature. Upgrade now to unlock unlimited studying tools.