ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
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...
 Question Submitted By :: Sivadasan
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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...
Answer
# 1
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 ?    1 Yes 0 No
Avani
 
  Re: 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...
Answer
# 2
Thanks Avani...
 
Is This Answer Correct ?    0 Yes 0 No
Sivadasan
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
How are this and super used?  6
what modifiers are used with top-level class?  2
What Method and class used for Connection pooling ? Wipro4
what is difference between validation.xml & validation rules.xml? BirlaSoft5
what is a static block?  4
can u handle an error if u write Thowable in the catch class lise try { some errorneous code }catch(Throwable e){ ...}  4
Nullpointer exception is a very common exception. Why is it not made as a checked exception? Ness-Technologies1
What is System class and its purpose?  2
what are the different access specifiers that can be used by interfaces and abstract classes? can anyone give me detailed description on this  7
Hi Friends, can u give me Real Time example for interface and abstract class.(With Banking Example)  1
how many types of cloning? Mobily1
What are types of Java applications?  4
Difference between prefix and postfix forms of the ++operator?  2
what is overloading and overriding with example? CMC1
How GC (Garbage Collector) knows the objects reference is unused.Whether GC removes the unused object Parmanently or it maintains something.  2
Describe inheritance as applied to java?  4
what are class,constructor and primitive data types?  2
Difference between local and global transaction ? iFlex1
Default layout of panel and frame?  2
Name the method of a Container that can be used to cause a container to be laid out and redisplayed?  1
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com