Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8382047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T16:50:29+00:00 2026-06-09T16:50:29+00:00

I have a list say its has 25 rows. My page count will be

  • 0

I have a list say its has 25 rows. My page count will be always 5 and i ll be passing the pageId to the list so that i can get only those 5 rows which belongs to that page id (say if my pageId is 2 i need rows from 6-10).. Any simple method to do this???

List<Employee> empList= (List<Employee>)employeeHelper.fetchallData();

This emplist will have all the rows.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T16:50:31+00:00Added an answer on June 9, 2026 at 4:50 pm

    I am not sure I understand, but it seems you are looking for a sublist of emplist.

    You can use the method List.subList(int fromIndex, int toIndex) for it.

    From the javadocs:

    Returns a view of the portion of this list between the specified
    fromIndex, inclusive, and toIndex, exclusive. (If fromIndex and
    toIndex are equal, the returned list is empty.) The returned list is
    backed by this list, so non-structural changes in the returned list
    are reflected in this list, and vice-versa. The returned list supports
    all of the optional list operations supported by this list.

    This method eliminates the need for explicit range operations (of the
    sort that commonly exist for arrays). Any operation that expects a
    list can be used as a range operation by passing a subList view
    instead of a whole list.

    To get the elements 5-10 (inclusive, count start at 1) in the 2nd doc:
    emplist.subList(25 * (2-1) + (5-1), 25 * (2-1) + 10)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have a list: L = [15,16,57,59,14] The list contains mesurements, that
I have a list of objects say, List. The Entity class has an equals
I have Web page in share-point 2010 ,its has two web parts one for
Say we have a class of Customer and that has a child object of
I have some html that creates a dropdown list. The list has text values
Say I have a list of arguments: > (setf format-args `(t it's ~a 1))
Say you have a linked list structure in Java. It's made up of Nodes:
i have a list of say courses and certificates and fun_days . These are
I have a list of say 100k floats and I want to convert it
I have a List of keys say 'ListA'. And a map of keys &

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.