🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Pagination and Sorting: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. With size = 20, what is the offset for page 3 (pages start at 0)?
  2. Q2. There are 101 courses and the page size is 10. How many pages are there?
  3. Q3. What does this print? (code)
  4. Q4. What does PageRequest.of(1, 10) request?
  5. Q5. What is the main difference between Page<T and Slice<T?
  6. Q6. Courses are sorted only by fee, and many have the same fee. What can go wrong?
  7. Q7. What does this print? (code)
  8. Q8. Why should a controller cap the page size?
  9. Q9. Why does OFFSET 100000 LIMIT 10 get slow?
  10. Q10. What is a limitation of keyset pagination?