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