PageRequest usage

Report a typo

How do you create the instance of PageRequest to get the data for the first page of the application containing 15 records from a database?

Java
  1. Pageable pageable = PageRequest.of(0, 15)
  2. Pageable pageable = PageRequest.of(15, 0)
  3. Pageable pageable = PageRequest.of(1, 15)
  4. Pageable pageable = PageRequest.of(15, 1)
Kotlin
  1. val pageable: Pageable = PageRequest.of(0, 15)
  2. val pageable: Pageable = PageRequest.of(15, 0)
  3. val pageable: Pageable = PageRequest.of(1, 15)
  4. val pageable: Pageable = PageRequest.of(15, 1)
Select one option from the list
___

Create a free account to access the full topic