I have 100 records in a table with two rows. I need to
display 10 records per page like Google Search. I need only
the Logic(Pagination) in Pure Java. No JSP and all..Thanks
in Advance...
Answers were Sorted based on User's Feedback
Answer / avani
String strPageNum = request.getParameter(“pageNum”);
int pageNum = 0;
if(strPageNum != null){
pageNum = new Integer(strPageNum).intValue();
}
int maxRowsPerPage = new Integer(request.getParameter
(“rowsPerPage”)).intValue();
//calculate
int rowEnd = pageNum * maxRowsPerPage;
int rowStart = (rowEnd - maxRowsPerPage) + 1;
| Is This Answer Correct ? | 9 Yes | 8 No |
Explain the features of java?
What is the this keyword?
what is wrapper class and its uses?
How to create a custom exception?
Explain about fail fast iterators in java?
What is indexof in java?
Can Anybody tell the diff b/w jdk1.6 and latest version.
What is a “stateless” protocol ?
What is a double vs float?
Can we force the garbage collection to run?
What do you mean by default constructor in java?
Can singleton class be inherited in java?