Remove element from array list

packagejavaRadarArrayList; importjava.util.ArrayList; public class RemoveAtIndex {       public static void main(String[] args) {             //create Array List             ArrayList<String> javaRadarList = newArrayList<String>();             //Add elements to ArrayList             javaRadarList.add(“Java”);             javaRadarList.add(“Jquery”);             javaRadarList.add(“Spring”);             javaRadarList.add(“Hibernate”);             javaRadarList.add(“EJB”);                         System.out.println(“Before

Traverse ArrayList using Enumeration

packagejavaRadarArrayList; importjava.util.ArrayList; importjava.util.Collections; importjava.util.Enumeration; import java.util.ListIterator; public classEnumerationTraversal {       public static void main(String[] args) {             //create Array List             ArrayList<String> javaRadarList = newArrayList<String>();             //Add elements to ArrayList             javaRadarList.add(“Java”);             javaRadarList.add(“Jquery”);             javaRadarList.add(“Spring”);             javaRadarList.add(“Hibernate”);             javaRadarList.add(“EJB”);

TreeSet in java

TreeSet is a class that implements Set interface and extends AbstractSet class. By default, elements in TreeSet class is stored in ascending order (see example given below). Key feature of TreeSet 1.     TreeSet contains only unique elements. 2.     Maintains ascending order (by default).  3.     Access and retrival time is fast in TreeSet. Now let’s look