// "Replace Stream API chain with loop" "true" import java.util.List; public class Main { public long test(List list) { if(!list.isEmpty()) return list.stream().count(); return -1; } }