用equals判断等于,ArrayList一般用循环get方法获取,s.remove(i)删除。
字符串比较使用equals方法,别用==,还有就是定义list,不要使用ArrayList,你应该这样写
List<String> list=new ArrayList<>();