Many a times we forget to the close the file/jdbc resources that we open inside a try block after the operations are complete. This can cause memory leak issue. Starting from JDK 1.7, a new feature
Sorting of ArrayList in Java using Comparators
In this article we will see the sorting of arraylist in java using comparators. This is mainly used for sorting arraylist that contain user defined objects. Collection.sort() takes 2 parameters. 1s
Sorting of ArrayList in Java – primitives and literals
In this article we will explain the method used for sorting of arraylist for primitives/literals. Sorting of Arraylist for primitives and literals For sorting arrayList of any primitives or literal
How to Iterate through Hashmap
In this article we will focus on how to iterate through hashmap. There are many ways to iterate through HashMap’s in java. We will try some of them. Methods to iterate through hashmap Using f