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

What are the different access modifiers available in java?

0 Answers  


What is entry in java?

0 Answers  


Name and explain the types of ways which are used to pass arguments in any function in java.

0 Answers  


What is parameter example?

0 Answers  


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

1 Answers  


how can you catch multiple exceptions in java?

0 Answers   Cyient,


Explain differences between checked and unchecked exceptions in java?

0 Answers  


without using arthematic operation ,how can you write the logic for adding/substraction/multiplication?

7 Answers   Tanla Solutions, Wipro,


Explain public static void main(string args[]) in java.

0 Answers  


Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..

0 Answers  


Why string is a class?

0 Answers  


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

0 Answers   Amazon,


Categories