1

I've seen the following code, used for pagination of SQL results:

Page<EmployeeEvent> employeeEventPage = new PageImpl<>(employeeEvents, null, 10);

Why do we need to use the "<>" in this context, giving we're talking Java 8? Is that not the same as

Page<EmployeeEvent> employeeEventPage = new PageImpl(employeeEvents, null, 10);

?

Page is defined as follows:

public interface Page<T> extends Slice<T>
Nestor Milyaev
  • 5,845
  • 2
  • 35
  • 51

0 Answers0