public static void main(String[] args) {

        List<String> list = new ArrayList<String>();
        String s1 = "hello";
        String s2 = "world";
        String s3 = "java";
        list.add(s1);
        list.add(s2);
        list.add(s3);

        ListIterator<String> lit = list.listIterator();
        while (lit.hasNext()) {
            String s = (String) lit.next();
            if (s.equals("hello")) {
                lit.add("javaee");
            }
        }

        System.out.println(list);
    }