How can ArrayList.remove () remove a specific number in an Integer array?
If you pass a number without quotes in the parameters of the method, it means an index, in quotes it does not work ...
import java.util.ArrayList; public class Circle { public static void main(String[] args) { ArrayList<Integer> list = new ArrayList<Integer>(); list.add(2); list.add(1); list.add(3); list.remove("2"); //что писать в скобках? System.out.println(list); } }