Answers for "how does arraylist.remove() work"

0

arraylist remove name in java

public static void main(String[] args) {

ArrayList<String> names = new ArrayList<>(Arrays.asList("Ahmed", "John", "Eric", "Ahmed"));
    names.removeAll( Arrays.asList("Ahmed"));
    System.out.println(names); // [John, Eric]
Posted by: Guest on June-09-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language