• TreeSet implementation

    TreeSet implementation using Iterator

    We already know implementation of ArrayList using Iterator Class in our ArrayList blogs. Here we will work on TreeSet implementation. Now, we will see how to fetch data from TreeSet using iterator() method.   TreeSet collection type gives ascending order of this data.   Let’s see simple example on TreeSet implementation.   import java.util.*; class […]

  • collection set

    How many collection set in Java Program?

    Three types of collection set in java programs. LinkedHashSet collection set HashSet TreeSet Generally these three work same in java collection programming. But in this blog, we will see basic different between collection set. LinkedHashSet works same as added data in Set. HashSet works as randomly with data. TreeSet works ascending order with data.   […]

  • LinkedList Class

    LinkedList Class Example with Iterator

    In this blog, we will see how to LinkedList class work with Iterator class with hasNext() and next() method. In this blog, we will also see how to add data in first and last location of list using addFirst() and addLast() methods. These two function do not work in ArrayList class.   Let’s see Example […]

  • LinkedList Class

    LinkedList Class V/S ArrayList Class

    In this blog, we will see how to LinkedList Class and ArrayList collection class different with each other.  Both classes can add data using add() method. But in this blog, we will also see addFirst() and addLast() method do not working in ArrayList class. We also see how to removeFirst() and removeLast() method do not […]

  • Iterator Class

    Iterator Class with iterator() Method

    In this blog, We will see how to fetch data from ArrayList Class using Iterator class using iterator() method. We will also see how to use hasNext() method for check data and next() method for store data in String class. In this blog, we will see display 5 country name in uppercase using ArrayList, Iterator, […]

  • java collection

    Java Collection: ArrayList

    ArrayList is one java collection class. We can store any type of object data in ArrayList. In this blog, we will see how to store Integer data in ArrayList Class, display ArrayList and use of ArrayList object data.   How to declare ArrayList Class? ArrayList<Generics> object = new ArrayList<Generics>(); Example: ArrayList<Integer> list1 = new ArrayList<Integer>(); […]

  • Java Collection Classes

    Java collection is most important part in java language. In this blog we will see list of java collection classes. We also add java collection java programs and theory files.   List of Java Collection Classes List ArrayList LinkedList Set LinkedHashSet HashSet TreeSet Map LinkedHashMap HashMap TreeMap Table Hashtable Other Classes Enumeration Iterator Object   […]