0

I want to remove list item with value 5 from the list. I do not want to remove it based on index since values added to the list are random.

List<Integer> list = new ArrayList<>();

list.add(3); //adding the value

list.add(1);

list.add(5);

list.add(4);

sukanya meruva Answered question