Adding and Searching in Java ArrayList – Usage and Pitfalls

ArrayList ArrayList in Java implements List Interface.  It accepts even null elements. ArrayList is not synchronized and therefore external synchronization is required while working with ArrayList in Multi-threaded environments. We will see how to add elements and search elements from an ArrayList. Adding elements to an ArrayList is straightforward. Searching…

Continue reading