Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



I have 100 records in a table with two rows. I need to display 10 records per page like Google Sea..

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

I have 100 records in a table with two rows. I need to display 10 records per page like Google Sea..

Answer / sivadasan

Thanks Avani...

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More Core Java Interview Questions

Is a method a function?

0 Answers  


What is clipping and repainting and what is the relation between them?

1 Answers  


What are the special characters?

0 Answers  


what do you understand by synchronization? : Java thread

0 Answers  


How to count occurrences of each duplicate element in a list {a,b,d,c,a,b} ? Thanks in Advance

2 Answers   TCS,


What is the size of string?

0 Answers  


Assume a thread has lock on it, calling sleep() method on that thread will release the lock?

0 Answers  


Explain wrapper classes in java?

0 Answers  


Explain about member inner classes?

0 Answers  


Can we declare main () method as non static?

0 Answers  


what is the messsage u r going to get from an objectoriented programing?

0 Answers   MGL,


How can an object be unreferenced?

0 Answers  


Categories