API java列表和集合

-3 java api collections list arraylist

它是什么意思它是一个数组或它是一个列表类型字符串

List<String> list = new ArrayList<String>(); // why parenthesis
List<String> removeList = new ArrayList<String>();//why parenthesis
Run Code Online (Sandbox Code Playgroud)

这个方法那么List和Collection和arrys之间有什么区别呢

// what mean this collection
    private void removeColors(Collection<String> collection1,Collection<String> collection2)
    {
        Iterator<String> iterator = collection1.iterator();//what does mean
        while(iterator.hasNext())//what does mean
            if(collection2.contains(iterator.next()))//what does mean
                iterator.remove();//what does mean
    }
Run Code Online (Sandbox Code Playgroud)