• 2022-07-23
    假设一个ArrayList列表包含{"red","red","green"},下面的代码执行后列表的内容为_________?Stringelement="red";for(inti=list.size()-1;i>=0;i--)if(list.get(i).equals(element))list.remove(element);
    A: {"red","red","green"}
    B: {"red","green"}
    C: {"green"}
    D: {}