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   To Refer this Site to Your Friends   Click Here
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
 
What is Exception handling in Java How do you handle run time errors please explain with an example TCS2
why there are multiple catches for a try block.don't tell me that there can be multiple exception of a code segment that's why.tell me the real fact behind this.  4
Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang> Symphony6
Difference between JDK, JRE, JVM Oracle5
What for read() function?  3
How can you reverse a string?  4
what is polymorphism? Zensar5
What happens when you assigned a 'double' value to a 'String'?  6
What is the range of the short datatype?  2
diff b/w sleep(1000) and wait(1000)? Huawei2
what is main purpose of interface? Accenture2
how can i cal servlet from jsp page?how can i pass variablesfrom the jsp that servlet can access? Verizon1
Write a program to create a binary Tree ?  1
Is 'null' a keyword?  3
JSP is by default thread safe or not? what is the meaning of isThreadSafe="true" and isThreadSafe="false". Explain it? Thanks, Seenu Huawei3
Does garbage collection guarantee that a program will not run out of memory?  1
why the equals method can be override?when we override the equals method?  4
What is update method and when it is called?  1
Explain Global variables in Packages?  2
Functionality of JVM? Infosys4
 
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