JavaProgramTo.com

Java Tutorials for Freshers and Experience developers, Programming interview Questions, Data Structure and Algorithms interview Programs, Kotlin programs, String Programs, Java 8 Stream API, Spring Boot and Troubleshooting common issues.

Pages

  • Home
  • Java.Util
  • OPtional API
Showing posts with label Sort. Show all posts
Showing posts with label Sort. Show all posts

Sunday, August 16, 2020

Java 8 – Sorting Stream On Multiple Fields with Comparator.thenComparing()

1.Overview

In this tutorial, You'll learn how to sort the collection or stream of objects on multiple fields in java 8.

In the previous article, I have shown how to implement custom sorting using Collections.sort() method.

Java 8 – Sorting Stream On Multiple Fields with Comparator.thenComparing()
Read more »
- August 16, 2020 No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Tags Java 8, Sort
Older Posts Home
Subscribe to: Posts (Atom)

Popular Posts

  • 3 Ways to Fix Git Clone "Filename too long" Error in Windows [Fixed]
  • Java Program To Reverse A String Without Using String Inbuilt Function reverse()
  • Java Thread.join() Examples to Wait for Another Thread
  • Java IS-A and HAS-A Relationship With Examples
  • Java - Meaning of \N and \T With Examples

Syntax

Blog Archive

  • ▼  2025 (6)
    • ▼  July 2025 (6)
      • Java Platform Threads Explained: Are They Too Expe...
      • Two ways to Unstage a File in Git git rm --cached...
      • Java 21 Virtual Threads Basic and Foundation
      • Java 8 - How to convert Calendar to LocalDateTime?
      • Ultimate Guide to Java Virtual Threads: Build Scal...
      • Mastering @JsonFormat in Jackson: A Complete Guide...
  • ►  2024 (3)
    • ►  September 2024 (3)
  • ►  2022 (3)
    • ►  January 2022 (3)
  • ►  2021 (169)
    • ►  December 2021 (58)
    • ►  November 2021 (81)
    • ►  June 2021 (9)
    • ►  April 2021 (1)
    • ►  March 2021 (3)
    • ►  February 2021 (5)
    • ►  January 2021 (12)
  • ►  2020 (250)
    • ►  December 2020 (32)
    • ►  November 2020 (44)
    • ►  October 2020 (17)
    • ►  September 2020 (3)
    • ►  August 2020 (25)
    • ►  July 2020 (23)
    • ►  June 2020 (4)
    • ►  May 2020 (25)
    • ►  April 2020 (38)
    • ►  March 2020 (17)
    • ►  February 2020 (7)
    • ►  January 2020 (15)
  • ►  2019 (119)
    • ►  December 2019 (15)
    • ►  November 2019 (10)
    • ►  October 2019 (3)
    • ►  September 2019 (1)
    • ►  August 2019 (1)
    • ►  July 2019 (6)
    • ►  June 2019 (4)
    • ►  May 2019 (26)
    • ►  April 2019 (32)
    • ►  March 2019 (12)
    • ►  February 2019 (8)
    • ►  January 2019 (1)
  • ►  2018 (3)
    • ►  September 2018 (2)
    • ►  July 2018 (1)
  • ►  2017 (18)
    • ►  December 2017 (1)
    • ►  November 2017 (5)
    • ►  October 2017 (7)
    • ►  September 2017 (4)
    • ►  August 2017 (1)
  • ►  2015 (3)
    • ►  April 2015 (3)
  • ►  2013 (1)
    • ►  August 2013 (1)

Contact Form

Name

Email *

Message *

Search This Blog

Report Abuse

Spring Boot

  • @EnableAutoConfiguration Annotation
  • MongoDB - CRUD Operations
  • MongoDB - Projections and Aggregations
  • Scanning Multiple Packages

Java String API

  • charAt()
  • chars() - Java 9
  • codePointAt()
  • codePointCount()
  • codePoints() - Java 9
  • compareTo()
  • compareToIgnoreCase
  • concat()
  • contains()
  • contentEquals()
  • copyValueOf()
  • describeConstable() - Java 12
  • endsWith()
  • equals()
  • equalsIgnoreCase()
  • format()
  • getBytes()
  • getChars()
  • hashcode()
  • indent() - Java 12
  • indexOf()
  • intern()
  • isBlank() - java 11
  • isEmpty()
  • join()
  • lastIndexOf()
  • length()
  • lines()
  • matches()
  • offsetByCodePoints()
  • regionMatches()
  • repeat()
  • replaceFirst()
  • replace()
  • replaceAll()
  • resolveConstantDesc()
  • split()
  • strip(), stripLeading(), stripTrailing()
  • substring()
  • toCharArray()
  • toLowerCase()
  • transform() - Java 12
  • valueOf()

Java Conversions

  • Java 8 List To Map
  • Java 8 String To Date
  • Java 8 Array To List
  • Java 8 List To Array
  • Java 8 Any Primitive To String
  • Java 8 Iterable To Stream
  • Java 8 Stream To IntStream
  • String To Lowercase
  • InputStream To File
  • Primitive Array To List
  • Int To String Conversion
  • String To ArrayList

Kotlin Programs

  • Sort ArrayList of Custom Objects
  • Join Two Lists
  • Get Current Date and Time

Kotlin Conversions

  • Error Stack Trace To String
  • String To Date
  • List To Array
  • Convert String to Float
  • Convert List to Map
  • Convert Map to List

Java Threads Tutorial

  • How To Create Thread?
  • How To Kill Thread?
  • Thread Priorities
  • Thread States Life Cycle Flow
  • Thread Join()
  • interrupt() VS interrupted() VS isInterrupted()
  • Create Thread Without Implementing Runnable
  • Create Thread Without Extending Thread Class
  • Matrix Multiplication With Thread (Efficient Way)
  • How To Delay Thread Execution?

Java 8 Tutorial

  • Java 8 New Features
  • Java 8 Examples Programs Before and After Lambda
  • Java 8 Lambda Expressions (Complete Guide)
  • Java 8 Lambda Expressions Rules and Examples
  • Java 8 Accessing Variables from Lambda Expressions
  • Java 8 Method References
  • Java 8 Functional Interfaces
  • Java 8 - Base64
  • Java 8 Default and Static Methods In Interfaces
  • Java 8 Optional
  • Java 8 New Date Time API
  • Java 8 - Nashorn JavaScript

Subscribe Us

Java8Example. Powered by Blogger.