LearnJava

Your one stop for all Java related resources

  • Home
  • Testimonials
  • Services
  • Blog
    • Java Tutorial
    • Java 8
    • Java 9
    • Java 10
    • Java examples
    • Java Interview Questions
    • Spring and SpringBoot
    • JPA, Hibernate and JDBC
    • REST
    • Unit Testing
    • Tomcat, Eclipse and Maven
    • Git and Github
    • Python
  • Courses
  • Contact

Category: Java-Collection-Examples

Posted On September 23, 2020January 23, 2021
Core JavaJava Interview QuestionsJava_Language_FeaturesJava-Collection-Examples

Difference between Comparator and Comparable

Posted By admin

Java has two interfaces that you can use for sorting custom objects. These are the Comparator and Comparable interface. In […]

read more
Collections FrameworkJava-Collection-Examples

How to sort a List in Descending order

Posted By admin

In this article, I will be demonstrating how you can sort a List in descending order. In order to see […]

read more
Java Interview QuestionsJava-Collection-Examples

Java TreeSet and HashSet similarities and differences

Posted By admin

Java TreeSet and HashSet are implementations of the Set interface. Often you may have wondered, whether to choose HashSet or […]

read more
Collections FrameworkJava-Collection-Examples

How to reverse a List in Java

Posted By admin

In this blog post, I will be explaining how you can reverse a Set or List via Java.  Consider the […]

read more
Collections FrameworkJava-Collection-Examples

How to convert a Java list to an array

Posted By admin

In this blog post, I will be explaining how you can convert a Java list to an array. To see […]

read more
Collections FrameworkJava-Collection-Examples

How to find if two lists are exactly the same

Posted By admin

In this blog post, I will be explaining how you can check if 2 lists are exactly the same. Consider […]

read more
Collections FrameworkJava-Collection-Examples

How to create a list with data without using list.add multiple times

Posted By admin

In this blog post, I will be explaining how you can easily create a List of elements with some data. […]

read more
Collections FrameworkJava-Collection-Examples

How to sort a List via Java

Posted By admin

In this blog post, I will be explaining how you can sort a list via Java.  Consider the following code […]

read more
Collections FrameworkJava-Collection-Examples

How to shuffle the elements in a List via Java

Posted By admin

In this blog post, I will be explaining how you can shuffle list via Java.  Consider the following code snippet: […]

read more
Collections FrameworkJava-Collection-Examples

How to find the maximum and minimum number in a List

Posted By admin

In this blog post, I will be demonstrating how you can find the largest and smallest number in an array. […]

read more

Posts navigation

Older posts

Recent Posts

  • How to Containerize a Spring Boot Application Using Docker September 28, 2024
  • Jackson ObjectMapper with examples September 7, 2024
  • Git Merge Rebase and Squash Explained August 31, 2024
  • Explaining the Record Class in Java August 24, 2024
  • Java 17 Features August 4, 2024

Archives

  • September 2024
  • August 2024
  • September 2023
  • July 2023
  • May 2023
  • November 2022
  • October 2022
  • February 2022
  • January 2022
  • December 2021
  • July 2021
  • June 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • August 2019
  • July 2019
  • June 2019
  • May 2019
  • April 2019
  • March 2019
  • February 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018

Connect With Us On Facebook!

LearnJava

Archives

  • September 2024 (2)
  • August 2024 (3)
  • September 2023 (2)
  • July 2023 (1)
  • May 2023 (1)
  • November 2022 (1)
  • October 2022 (1)
  • February 2022 (2)
  • January 2022 (4)
  • December 2021 (5)
  • July 2021 (2)
  • June 2021 (1)
  • April 2021 (4)
  • March 2021 (5)
  • February 2021 (3)
  • January 2021 (1)
  • December 2020 (4)
  • September 2020 (2)
  • August 2020 (3)
  • July 2020 (4)
  • June 2020 (8)
  • May 2020 (8)
  • April 2020 (8)
  • March 2020 (6)
  • February 2020 (6)
  • January 2020 (6)
  • December 2019 (9)
  • November 2019 (2)
  • October 2019 (5)
  • September 2019 (5)
  • August 2019 (9)
  • July 2019 (10)
  • June 2019 (10)
  • May 2019 (16)
  • April 2019 (12)
  • March 2019 (11)
  • February 2019 (12)
  • January 2019 (23)
  • December 2018 (10)
  • November 2018 (10)
  • October 2018 (10)
  • September 2018 (13)
  • August 2018 (13)
Copyright © 2025 LearnJava
Theme by Adazing