// "Replace with collect" "true" package com.google.common.collect; import java.util.*; class Lists { public static ArrayList newArrayList() { return new ArrayList(); } } public class Test { public void test() { List list = Lists.newArrayList(); for(int i=0; i<10; i++) { if(i%2 == 0) { list.add(String.valueOf(i)); } } System.out.println(list); } }