I have an ArrayList that contains some object, such as User, and each object has a name and password property. How can I
ArrayList
User
name
password
Iterator it = list.iterator(); while (it.hasNext()) { User user = it.next(); if (user.getName().equals("John Doe")) { it.remove(); } }