Difference between Java's ArrayList set and add Methods
There are many methods in the java.util.ArrayList class in Java. But, two of the overloaded methods set and add at index, are quite interesting. I am writing this post just to tell you a small gotcha of the methods. ArrayList Class The ArrayList as the name suggests is an array but with dynamic size. A static array needs...