JAVA/JSP

JAVA 1.5 Collections

ddakker 2010. 6. 27. 22:27

// foreach
public Person(String fn, String ln, int a, Person... kids)
{
        this.firstName = fn; this.lastName = ln; this.age = a;
        for (Person child : kids)
            children.add(child);
}

// 배열 역순
Collections.reverse(list);