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

  • Object Class

    Object Class with toArray Method

    Object class is super class of all system define classes like Integer, Double, Float, String and many more. Object classes can store any types of data and then use easily. In this blog, we will see how to store Integer object data store in Object array using toArray() method.   Let’s see Example on Object […]

  • ArrayList Class

    ArrayList Class Simple Example

    In our last blog, we show how to use ArrayList class in java program. In this blog we will see simple ArrayList class example with Employee. How to add Employee class’s object into ArrayList. How to display Employee data using ArrayList using foreach concepts.   Let’s see Example on ArrayList Class   import java.util.*; class […]