Last active
January 22, 2020 05:14
-
-
Save NeerajItdose/29c0acf45c3f802084eada29dd91e4f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class PageNumber { | |
private static int limit = 25; | |
public static int getStartLimit(int pageNumber) { | |
return (pageNumber - 1) * limit; | |
} | |
public static int getEndLimit(int pageNumber) { | |
int fromPage = (pageNumber - 1) * limit; | |
return fromPage + limit; | |
} | |
public static int getLimit(){ | |
return limit; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment