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

Write a program to find the greatest of three numbers in java?

0 Answers  


What is constructor chaining in java?

0 Answers  


Differentiate storage classes on the basis of their scope?

0 Answers   Fidelity,


Can we modify the throws clause of the superclass method while overriding it in the subclass?

0 Answers  


How to override equals() and hashCode() method in java?

1 Answers   Wipro,


Write code of any action class?

0 Answers  


What is a file pointer?

0 Answers  


What is a condition in programming?

0 Answers  


What is final keyword?

0 Answers  


which one is performance wise advantageious from List,Set,Map?

6 Answers  


What is the format of Inner Class after it compiled?

1 Answers  


How to add two numbers with out using Arithmetic , union operators in java....? But we can use bitwise operators... but how...?

4 Answers   CTS, Satyam,


Categories