ArrayList and Iterator Example

This example shows how to use an iterator with ArrayList. Iterator can be used with other collections.

import java.util.*;

public class ArrayListIterator {
    public static void main(String[] args) {
        ArrayList al = new ArrayList();
        al.add(new Integer(11));
        al.add(new Integer(13));
        al.add(new Integer(17));

        Iterator itr = al.iterator();
        while (itr.hasNext()) {


Skills used in Data Science

Not all data scientist are alike. Some do general work while others focus on domains such as health, technology, or business. They can work in predictive analysis, big data, spatial data, or any combination of these. Based on their requirements they require different technical skills.


Following some technology trends that I have observed.

Data Science

A chemist studies chemical properties of objects. A biologist studies living beings. A data scientist studies data. Data is real. It has real properties. Study of data leads to information and knowledge. Answering questions with data leads to revelation, understanding, and wisdom.

ArrayList NullPointerException

Java's ArrayList is a great Collection that frees us from IndexOutOfBound, one type limitation, and NullPointerException issues while providing several value-added methods. Naturally, you would be shocked if you encounter a NullPointerException on an ArrayList. The only time, you would encounter this problem is when you fail to initialize the ArrayList.