• 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, […]