Sorting in Java with Generics | Comparable vs Comparator Made Easy

In this video, we dive deep into the Java Collections.sort() method and break down the often confusing generic syntax: T extends Comparable ? super T What you'll learn: What the generic syntax means Why Java uses T extends Comparable ? super T instead of just T How Comparable plays a role in sorting sort(ListT list, Comparator ? super T c Comparator and it's role in sorting Practical examples for better understanding Generics + Collections together Whether you're a Java beginner or brushing up on advanced generics, this video will help you understand the logic behind Java's sorting mechanism. Tip: Stick around till the end for bonus tips on using Collections.sort() with custom objects! Timestamp ------------------ 00:00 – Intro 03:00 – Java Generics Inheritance hands on (extends & super) 20:38 – Java sort() generics syntax explained 25:46 – Sorting Custom Objects with Comparable 35:22 - Why Comparable ? super T 45:58– Sort with Comparator : decoding generic design Don’t forget to like comment, and subscribe for more Java tutorials and coding insights! #java #collectionframework #sorting #generics #javatutorial #comparator For More free/paid courses visit www.seleniumexpress.com LINKS AND FREE LEARNING RESOURCES ======== Watch my new mock interview series for java developers    • Java interview questions and answers for e...   Watch Spring boot Hot topics    • @Reposicotry Vs @Service | Spring Boot | s...   Java Interview / Question and Answer series    • Java collections interview questions | Why...   Explain spring Bean Lifecycle    • REAL-TIME: Spring Bean life cycle using @P...   spring core    • Spring framework tutorial for beginners wi...   spring mvc    • Spring MVC course introduction || Understa...   spring mvc intermediate    • [INTERMEDIATE] Spring MVC Course Preview |...   Spring JDBC    • Spring JDBC Course Preview || Let’s talk d...   spring live project    • #1 Build and Deploy A Spring Project Step ...   SPRING SECURITY COURSE[NEW]    • Spring Security Course Preview | Learn to ...   For more courses visit https://www.seleniumexpress.com Any time you are getting stuck with issues, Feel free to ask for support. You can send mail to [email protected] you can ping me on my Facebook page   / seleniumexpress   Make sure to join my private Facebook page (Ask me here) “SeleniumExpress - Support"   / 187000222361579   you can ask for support in my website forum https://www.seleniumexpress.com Subscribe to my youtube channel Follow me on Insta   / selenium_express  

Stream.map() + Java Generics – Everything You’ve Been Missing! | Stream API | Generics | Java 8
▶︎

Stream.map() + Java Generics – Everything You’ve Been Missing! | Stream API | Generics | Java 8

Generics In Java - Full Simple Tutorial
▶︎

Generics In Java - Full Simple Tutorial

Java Optional Class Explained | Source Code, Optional.of() vs Optional.ofNullable() | Part 1
▶︎

Java Optional Class Explained | Source Code, Optional.of() vs Optional.ofNullable() | Part 1

Sorting using Comparator | Comparable Vs Comparator | Java interview question | Java collections
▶︎

Sorting using Comparator | Comparable Vs Comparator | Java interview question | Java collections

#95 Comparator vs Comparable in Java
▶︎

#95 Comparator vs Comparable in Java

From Beginner to Expert:  Why Java Generics ?  Explained!
▶︎

From Beginner to Expert: Why Java Generics ? Explained!

Write Efficient Bug-free and Simple Comparators in Java - JEP Café #17
▶︎

Write Efficient Bug-free and Simple Comparators in Java - JEP Café #17

Java Generics for Serious Developers – Upper & Lower bounded Wildcards , Extends, Super, PECS & More
▶︎

Java Generics for Serious Developers – Upper & Lower bounded Wildcards , Extends, Super, PECS & More

Instant Focus Mode – 40Hz Gamma Brainwave Music for Deep Focus & Productivity
▶︎

Instant Focus Mode – 40Hz Gamma Brainwave Music for Deep Focus & Productivity

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker
▶︎

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker

Java Reflection Explained - bɘniɒlqxƎ noiɟɔɘlʇɘЯ ɒvɒᒐ
▶︎

Java Reflection Explained - bɘniɒlqxƎ noiɟɔɘlʇɘЯ ɒvɒᒐ

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup
▶︎

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

Optionals In Java - Simple Tutorial
▶︎

Optionals In Java - Simple Tutorial

ASMR Addictive Fast Tapping Collection For Deep Sleep & Anxiety Relief (No Talking) — 2.5 Hours
▶︎

ASMR Addictive Fast Tapping Collection For Deep Sleep & Anxiety Relief (No Talking) — 2.5 Hours

Interview Question | Comparable vs Comparator in Java
▶︎

Interview Question | Comparable vs Comparator in Java

Big Grass Carp Catch | 3-Wheeled Truck Carries Giant Fish To Countryside Market
▶︎

Big Grass Carp Catch | 3-Wheeled Truck Carries Giant Fish To Countryside Market

How to (Re)start Your Java Journey in 2026
▶︎

How to (Re)start Your Java Journey in 2026

The Amazing Digital Circus Voice Actors Play Fast Food Simulator for Charity!
▶︎

The Amazing Digital Circus Voice Actors Play Fast Food Simulator for Charity!

Is the AfD a threat to Germany? Mehdi Hasan & Maximilian Krah | Head to Head
▶︎

Is the AfD a threat to Germany? Mehdi Hasan & Maximilian Krah | Head to Head

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones
▶︎

Co-Creator of Haskell: Functional Programming, Thinking in Types, Useless Languages | Simon Jones