News

In this blog we will learn how to iterate over the elements of a collection (here we considered ArrayList) using generics and without generics. First we will go through the process of using iterator ...
Solution 1 : Our first solution is very simple. All we are doing here is to loop over an array and comparing each element to every other element. For doing this, we are using two loops, inner loop, ...