Three ways to sort a list in Java
In this blog post, we will see three ways to sort a list in Java. We will see how to sort in ascending and in reversed order.
java
In this blog post, we will see three ways to sort a list in Java. We will see how to sort in ascending and in reversed order.
A TreeMap is a Red-Black Tree based implementation of a NavigableMap. In this post, we will look at TreeMap in Java and the methods offered by them.
A Map data structure is an object that maps keys to values. We will see how a HashMap works in java. We will also see how get and put operations work.
The Comparator is a comparison function in Java that imposes a total ordering on a collection of objects. The comparing is a static method in it.
The Abstract Factory Pattern provides an interface for creating families of related or dependent objects without specifying their concrete classes.
Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.
Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.