Using Comparators to sort objects in Java
Comparator interface is used to order the objects of user-defined classes. A comparator object is […]
Comparator interface is used to order the objects of user-defined classes. A comparator object is […]
In order to sort first by ID and if the Id’s are same then sort […]
Builder pattern was introduced to solve some of the problems with Factory and Abstract Factory […]
When creating copies of arrays or objects one can make a deep copy or a […]
One of the common problem while removing elements from an ArrayList in Java is the […]
Here is an example of the REST API using spring boot with MySql as the […]
Depending on your needs, you can either leverage @ComponentScan to automatically detect your class and […]
A comparable object is capable of comparing itself with another object. The class itself must […]
Example below shows how to iterate around an ArrayList. Example Output
Equals method is used when we compare two objects. Default implementation of equals method is […]
TreeMap is Red-Black tree based NavigableMap implementation. It is sorted according to the natural ordering […]
Serialization is a mechanism of converting the state of an object into a byte stream. […]
Serialization is simply turning an existing object into a byte array. This byte array represents […]
Tight Coupling: Tightly coupled object is an object that needs to know quite a bit […]
The design patterns are language independent strategies for solving common object-oriented design problems. When you […]
This CRUD example uses a product table, performs crud operations using spring boot and thymeleaf. […]