The method startWith(String) is undefined for the type Object

Viewed 44
public List<Product> search(String name) {
        return list.stream().filter(x -> x.getName().startWith(name)).collect(Collectors.toList());
0 Answers
Related