0% found this document useful (0 votes)
62 views

Q.no 1. Which of The Following Is A Correct Constructor For Thread?

The document is a sample exam for a Java programming course that contains 60 multiple choice questions related to Java programming concepts like threads, JDBC, JSP, and servlets. It provides instructions for taking the exam such as the time limit, number of questions, and guidelines for answering. The questions cover topics ranging from thread constructors to session management in servlets.

Uploaded by

geovonni.kavis
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views

Q.no 1. Which of The Following Is A Correct Constructor For Thread?

The document is a sample exam for a Java programming course that contains 60 multiple choice questions related to Java programming concepts like threads, JDBC, JSP, and servlets. It provides instructions for taking the exam such as the time limit, number of questions, and guidelines for answering. The questions cover topics ranging from thread constructors to session management in servlets.

Uploaded by

geovonni.kavis
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 182

10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?

testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

r
Seat No -

i to
Total number of questions : 60
13144_CS 345 PROGRAMMING IN JAVA II
Time : 1hr
Max Marks : 50

Ed
N.B

1) All questions are Multiple Choice Questions having single correct option.

2) Attempt any 50 questions out of 60.

DF
3) Use of calculator is allowed.

4) Each question carries 1 Mark.

5) Specially abled students are allowed 20 minutes extra for examination.

rP
6) Do not use pencils to darken answer.

7) Use only black/blue ball point pen to darken the appropriate circle.

8) No change will be allowed once the answer is marked on OMR Sheet.


te
9) Rough work shall not be done on OMR sheet or on question paper.

10) Darken ONLY ONE CIRCLE for each answer.


as

Q.no 1. Which of the following is a correct constructor for thread?

A : Thread(Runnable a, String str)


M

B : Thread(int priority)

C : Thread(Runnable a, int priority)


in

D : Thread(Runnable a, ThreadGroup t)

Q.no 2. pageContext is an implicit object in jsp.


ed

A : TRUE

B : FALSE
at

C:

D:
re

Q.no 3. What is JDBC?

A : java compiler
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 1/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : Java API

r
C : Java interpreter

i to
D : Both A and B

Q.no 4. Default value of a java thread is

Ed
A:0

B:1

C:5

DF
D : 10

Q.no 5. Which attribute specifies threding model in page directive in jsp.

rP
A : info

B : threadmod

C : isThreadSafe
te
D : language

Q.no 6. Why will you set auto commit mode to false?


as

A : To increase the performance

B : To maintain the integrity of business process


M

C : To use distributed transactions

D : Does all mentioned


in

Q.no 7. Which of the following code is used to get an attribute in a HTTP Session object in
servlets?

A : session.getAttribute(String name)
ed

B : session.alterAttribute(String name)

C : session.updateAttribute(String name)
at

D : session.setAttribute(String name)

Q.no 8. How can we destroy a session?


re

A : session.discontinue()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 2/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : session.invalidate()

r
C : session.disconnect()

i to
D : session.falsify()

Q.no 9. What is the meaning of ResultSet.TYPE_SCROLL_INSENSITIVE

Ed
A : This means that the ResultSet is insensitive to scrolling

B : This means that the Resultset is sensitive to scrolling, but insensitive to updates, i.e. not updateable

C : This means that the ResultSet is sensitive to scrolling, but insensitive to changes made by others

DF
D : The meaning depends on the type of data source, and the type and version of the driver you use
with this data source

Q.no 10. ODBC is not appropriate for direct use from java because it uses a

rP
A : C interface

B : C# interface

C : java interface
te
D : Both A and C
as
Q.no 11. Choose the statement that best describes the relationship between JSP and servlets:

A : Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime usage.
M

B : JSP and servlets are unrelated technologies.

C : Servlets and JSP are competing technologies for handling web requests. Servlets are being
superseded by JSP, which is preferred. The two technologies are not useful in combination.
in

D : JSPs are built on servlet semantics and all JSPs are compiled to servlets for runtime usage.

Q.no 12. What are scripting languages?


ed

A : The programming languages that pre decide the web page content

B : The programming languages that are simpler and offer same protection
at

C : The programming languages that trade off simplicity for protection

D : Complicates application
re

Q.no 13. Which two interfaces does the javax.servlet.jsp package have?

A : Page

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 3/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : HttpJspPage

r
C : JspriWter

i to
D : PageContext

Q.no 14. Which of the following stops execution of a thread?

Ed
A : Calling SetPriority() method on a Thread object

B : Calling notify() method on an object

C : Calling wait() method on an object

DF
D : Calling read() method on an InputStream object

Q.no 15. Which of the following methods are needed for loading a database driver in JDBC?

rP
A : registerDriver()

B : Class.forName()

C : Both 1 and 2
te
D : Register()

Q.no 16. Which type of Statement can execute parameterized queries?


as

A : PreparedStatement

B : ParameterizedStatement
M

C : ParameterizedStatement and CallableStatement

D : Executable Statement
in

Q.no 17. Which class can handle any type of request so that it is protocol-independent?

A : GenericServlet
ed

B : HttpServlet

C : Both A & B
at

D : Servlet

Q.no 18. Which of these methods sets every element of a List to a specified object?
re

A : set()

B : fill()
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 4/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Complete()

r
D : add()

i to
Q.no 19. What requires less resources?

A : Thread

Ed
B : Process

C : Thread and Process

D : Neither Thread nor Process

DF
Q.no 20. Which tag should be used to pass information from JSP to included JSP?

A : Using <%jsp:page> tag

rP
B : Using <%jsp:param> tag

C : Using <%jsp:import> tag

D : Using <%jsp:useBean> tag


te
Q.no 21. Sessions is a part of the SessionTracking and it is for maintaining the client state at
server side.
as
A : TRUE

B : False
M

C:

D:

Q.no 22. Which driver uses ODBC driver to connect to the database?
in

A : JDBC-ODBC bridge driver

B : Native - API driver


ed

C : Network Protocol driver

D : Thin driver
at

Q.no 23. Protocol used for handling Get and Post requests are

A : SMTP
re

B : FTP

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 5/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : HTTP

r
D : POP3

i to
Q.no 24. Which are the session tracking techniques? i. URL rewriting
ii. Using HTTPSession Class
iii.Using response object

Ed
iv. Using hidden form fields
v. Using cookies
vi. Using servlet object

A : i, ii, iii, vi

DF
B : i, ii, iv, v

C : i, vi, iii, v

D : i, ii, iii, v

rP
Q.no 25. RowSet object is non-scrollable and non-updatable by default.

A : TRUE

B : FALSE
te
C:
as
D:

Q.no 26. The Mechanism used by the web container to store session information for a particular
user is
M

A : Request Management

B : Container Management
in

C : Response Management

D : Session Management
ed

Q.no 27. Which packages represent interfaces and classes for servlet API?

A : javax.servlet

B : javax.servlet.http
at

C : Both 1 & 2
re

D : java

Q.no 28. What is the reason that a java program cannot directly communicate with an ODBC
driver?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 6/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : ODBC written in C# language

r
B : ODBC written in C language

i to
C : ODBC written in C++ language

D : ODBC written in COBOL language

Ed
Q.no 29. Which of these method wakes up all the threads?

A : wakeAll()

B : notify()

DF
C : start()

D : notifyAll()

rP
Q.no 30. Which statement is true for the class java.util.HashSet?

A : The elements in the collection are ordered.

B : The collection is guaranteed to be immutable.


te
C : The elements in the collection are guaranteed to be unique.

D : The elements in the collection are accessed using a unique key


as

Q.no 31. Which method used to return the last time the client sent request associated with
session.
M

A : getCreationTime()

B : getLastAccessedTime()

C : getMaxInterval()
in

D : getReturnTime()

Q.no 32. Web server is used for loading the init() method of servlet.
ed

A : TRUE

B : False
at

C:

D:
re

Q.no 33. Which of these is an incorrect form of using method max() to obtain maximum element?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 7/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : max(Collection c)

r
B : max(Collection c, Comparator comp)

i to
C : max(Comparator comp)

D : max(List c)

Ed
Q.no 34. Which method is used to send the same request and response objects to another servlet
in RequestDispatcher ?

A : forward()

DF
B : sendRedirect()

C : Both 1 & 2

D : send()

rP
Q.no 35. A JSP page consists of which tags?

A : HTML tags

B : JSP tags
te
C : Both 1 & 2
as
D : Notag

Q.no 36. Using mail API we cannot send mail from a servlet.
M

A : TRUE

B : False

C:
in

D:

Q.no 37. How can you start a database transaction in the database?
ed

A : By asking a Transaction object to your Connection, and calling the method begin() on it

B : By asking a Transaction object to your Connection, and setting the autoCommit property of the
at

Transaction to false

C : By calling the method beginTransaction() on the Connection object


re

D : By setting the autoCommit property of the Connection to false, and execute a statement in the
database

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 8/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 38. Which methods are used to bind the objects on HttpSession instance and get the

r
objects?

i to
A : setAttribute()

B : getAttribute()

Ed
C : Both A & B()

D : putAttribute()

Q.no 39. Which of the following is not a valid attribute of a page directives?

DF
A : language

B : extend

C : export

rP
D : import

Q.no 40. Which of these method is used to tell the calling thread to give up a monitor and go to
sleep until some other thread enters the same monitor?
te
A : wait()

B : notify()
as

C : notifyAll()

D : sleep()
M

Q.no 41. Which HTTP Request method is non-idempotent?

A : GET
in

B : POST

C : Both 1 & 2
ed

D : ENV

Q.no 42. RowSet is belong to which package?


at

A : java.sql

B : javax.sql
re

C : java.jdbc

D : javax.jdbc

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 9/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 43. Deque and Queue are derived from:

r
A : AbstractList

i to
B : Collection

C : AbstractCollection

Ed
D : List

Q.no 44. Which is faster and uses less memory?

A : ListEnumeration

DF
B : Iterator

C : Enumeartion

rP
D : ListIterator

Q.no 45. If your Java application is accessing multiple types of databases at the same time, which
type of driver is the preferred driver.

A : Type-1
te
B : Type-2
as
C : Type-3

D : Type-4
M

Q.no 46. Which JDBC driver Type(s) can be used in either applet or servlet code?

A : Both Type 1 and Type 2

B : Both Type 1 and Type 3


in

C : Both Type 3 and Type 4

D : Type 4 only
ed

Q.no 47. Which directive tells the Web Container to copy everything in the included file and
paste it into current JSP file?
at

A : taglib

B : Page
re

C : include

D : exclude

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 10/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 48. Which of the following is true about info Attribute?

r
A : The info attribute lets you provide a description of the JSP

i to
B : The info attribute is used by JSP container for optimization of generated servlet code.

C : Both of the above.

Ed
D : None

Q.no 49. Which attribute specifies a JSP page that should process any exceptions thrown but not
caught in the current page?

DF
A : The ErrorPage Attribute

B : The IsErrorPage Attribute

C : Both 1 & 2

rP
D : PageAttribute

Q.no 50. The default capacity of a ArrayList is:

A : 12
te
B : 16
as
C:1

D : 10
M

Q.no 51. How do you know in your Java program that a SQL warning is generated as a result of
executing a SQL statement in the database?

A : You must catch the checked SQLException which is thrown by the method which executes the
statement
in

B : You must catch the unchecked SQLWarningException which is thrown by the method which
executes the statement
ed

C : You must invoke the getWarnings() method on the Statement object (or a sub interface thereof)

D : You must query the ResultSet object about possible warnings generated by the database

Q.no 52. Type-2 driver called as


at

A : Native-protocol, pure Java driver


re

B : JDBC-Net, pure Java driver

C : Native-API, partly Java driver

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 11/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : JDBC-ODBC Bridge plus ODBC driver

r
Q.no 53. Which of the following attributes are mandatory in <jsp:getProperty /> tag?

i to
A : name, property

B : type, id

Ed
C : name, type

D : id, property

Q.no 54. By default cursor is pointing to

DF
A : Column Header

B : First Record

rP
C : Last Record

D : Middle Record

Q.no 55. which tag can hold any Java language expression that can be used as an argument
to out.println() method.
te
A : Expression tag
as
B : Declaration Tag/label>

C : Directive Tag
M

D : Scriplet Tag

Q.no 56. Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web
server and the DBMS are running on the same machine?
in

A : Type 1 only

B : Type 2 only
ed

C : Both Type 3 and Type 4

D : All the above


at

Q.no 57. In HTTP Request what asks for the loopback of the request message, for testing or for
troubleshooting?

A : PUT
re

B : OPTIONS

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 12/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : DELETE

r
D : TRACE

i to
Q.no 58. What is the output of the prg. q33.jpg

A : abcdef

Ed
B : defabc

C : abcabc

D : defdef

DF
Q.no 59. Which method in session tracking is used in a bit of information that is sent by a web
server to a browser and which can later be read back from that browser?

A : HttpSession

rP
B : URL rewriting

C : Cookies

D : Hidden form fields


te
Q.no 60. Which are the examples of Application Server?
as
A : Tomcat

B : Weblogic
M

C : JBoss

D : Both 2 and 3

Q.no 1. Name the method defined in the HttpServletResponse class that may be used to set the
in

content type. Select the one correct answer.

A : setContent
ed

B : setType

C : setContentType
at

D : setResponseContentType

Q.no 2. Which of the following will ensure the thread will be in running state?
re

A : yield()

B : notify()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 13/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : wait()

r
D : Thread.killThread()

i to
Q.no 3. Servlets handle multiple simultaneous requests by using threads.

A : TRUE

Ed
B : FALSE

C:

D:

DF
Q.no 4. Which of these statements is incorrect?

A : By multithreading CPU idle time is minimized, and we can take maximum use of it

rP
B : By multitasking CPU idle time is minimized, and we can take maximum use of it

C : Two thread in Java can have the same priority

D : A thread can exist only in two states, running and blocked


te
Q.no 5. Preparedstatement Object in JDBC is used to execute which of the following query

A : executable
as

B : simple

C : high level
M

D : parameterized

Q.no 6. What is multithreaded programming?


in

A : It’s a process in which two different processes run simultaneously

B : It’s a process in which two or more parts of same process run simultaneously
ed

C : It’s a process in which many different process are able to access same information

D : It’s a process in which a single process can access information from many sources
at

Q.no 7. Choose an incorrect statement from the following.

A : . JSP pages are easier to maintain than a servlet.


re

B : The Web Container translate a Servlet into JSP page

C : JSP is built on Java Technology so it is platform independent


https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 14/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : A JSP page seperates presentation and business logic.

r
Q.no 8. PageContext is instance of which class?

i to
A : javax.servlet.ServletContext

B : javax.servlet.ServletConfig

Ed
C : javax.servlet.jsp.PageContext

D : javax.servlet.Application

Q.no 9. Which of the following method can be used to get the multiple values of a parameter like

DF
checkbox data?

A : request.getParameter()

B : request.getParameterValues()

rP
C : request.getParameterNames()

D : request.getFunctionNames()

Q.no 10. Which of the following is stored at client side?


te
A : URL rewriting
as
B : Hidden form fields

C : SSL sessions
M

D : Cookies

Q.no 11. Which of the following is a server side technology?

A : html
in

B : jsp

C : javascript
ed

D : css

Q.no 12. JDBC is a which type of inerface which means that it is used to invoke SQL commands
at

directly

A : low-level
re

B : middle-level

C : higher-level

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 15/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : user

r
Q.no 13. Which is the basic Interface that inherits all other Interfaces?

i to
A : Set

B : Array

Ed
C : List

D : Collection

Q.no 14. In which Interface keys and values are objects.

DF
A : Map

B : Set

rP
C : TreeSet

D : HashSet

Q.no 15. When doGet() method of servlet gets called?


te
A : GET request results from a normal request for a URL.

B : The service() method checks the HTTP request type as GET and calls doGet() method.
as

C : Both of above

D : When Invoked then


M

Q.no 16. Which method of stack returns the element on the top of the stack by not removing it

A : search()
in

B : pop()

C : peek()
ed

D : push()

Q.no 17. In JSP how many ways are there to perform exception handling?
at

A:3

B:2
re

C:4

D:5
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 16/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 18. The Interface ResultSet has a method getMataData() that returns

r
A : Tuple

i to
B : Value

C : Object

Ed
D : Result

Q.no 19. What is a Expression in JSP?

A : <%= %>

DF
B : <% %>

C : <* *>

rP
D : <? ?>

Q.no 20. Which statements about JDBC are true?

A : JDBC is an API to connect to relational-, object- and XML data sources


te
B : JDBC stands for Java DataBase Connectivity

C : JDBC is an API to access relational databases, spreadsheets and flat files


as

D : Both 2 and 3

Q.no 21. Which of the scripting of JSP not putting content into service method of the converted
M

servlet?

A : Declarations

B : Scriptlets
in

C : Expressions

D : Include
ed

Q.no 22. “out” is implicit object of which class?

A : javax.servlet.jsp.PrintWriter
at

B : javax.servlet.jsp.SessionWriter

C : javax.servlet.jsp.SessionPrinter
re

D : javax.servlet.jsp.JspWriter

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 17/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 23. Which result set generally does not show changes to the underlying database that are

r
made while it is open. The membership, order, and column values of rows are typically fixed
when the result set is created?

i to
A : TYPE_FORWARD_ONLY

B : TYPE_SCROLL_INSENSITIVE

Ed
C : TYPE_SCROLL_SENSITIVE

D : TYPE_SCROLL

Q.no 24. What is the Output of following Java Program? q25.jpg

DF
A : 11 10 22 5 12 2

B : 2 12 5 22 10 11

C : 2 5 10 11 12 22

rP
D : 22 12 11 10 5 2

Q.no 25. Drivers that are JDBC Compliant should normally support scrollable result sets, but
they are not required to do so
te
A : TRUE
as
B : FALSE

C:
M

D:

Q.no 26. What is the relation between hashset and hashmap?

A : HashSet internally implements HashMap


in

B : HashMap internally implements HashSet

C : HashMap is the interface; HashSet is the concrete class


ed

D : HashSet is the interface; HashMap is the concrete class

Q.no 27. What programming language(s) or scripting language(s) does Java Server Pages (JSP)
support?
at

A : VBScript only
re

B : Jscript only

C : Java only

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 18/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Text only

r
Q.no 28. Which of the following action variable is used to include a file in JSP?

i to
A : jsp:setProperty

B : jsp:getProperty

Ed
C : jsp:include

D : jsp:plugin

Q.no 29. If a priority of a java thread is 3 then the default priority of its child thread will be

DF
A:0

B:1

rP
C:5

D:3

Q.no 30. Which of the following code retrieves the MIME type of the body of the request?
te
A : new MimeType()

B : request.getContentType()
as

C : response.getContentType()

D : getContent()
M

Q.no 31. What happens if you call deleteRow() on a ResultSet object?

A : The row you are positioned on is deleted from the ResultSet, but not from the database.
in

B : The row you are positioned on is deleted from the ResultSet and from the database

C : The result depends on whether the property synchronizeWithDataSource is set to true or false
ed

D : You will get a compile error: the method does not exist because you can not delete rows from a
ResultSet

Q.no 32. Which of this method is used to insert value and its key in HashTable?
at

A : put()

B : set()
re

C : insertElement()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 19/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : addElement()

r
Q.no 33. Java code is embedded under which tag in JSP?

i to
A : Declaration

B : Scriptlet

Ed
C : Expression

D : Comment

Q.no 34. Which JDBC drivers will run your program?

DF
A : The JDBC-ODBC bridge

B : The JDBC driver manager

rP
C : The JDBC driver test suite

D : Partly Java Driver

Q.no 35. How many steps are used to connect any java application using JDBC?
te
A:5

B:4
as

C:3

D:6
M

Q.no 36. What is synchronization in reference to a thread?

A : It’s a process of handling situations when two or more threads need access to a shared resource
in

B : It’s a process by which many thread are able to access same shared resource simultaneously

C : It’s a process by which a method is able to access many different threads simultaneously
ed

D : It’s a method that allow too many threads to access any information that require

Q.no 37. Which of these interface declares core method that all collections will have?
at

A : set

B : EventListner
re

C : Comparator

D : Collection
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 20/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 38. Which method must be implemented by a Java thread?

r
A: run()

i to
B : execute()

C : start()

Ed
D : paint()

Q.no 39. The ResultSet.next method is used to move to the next row of the ResultSet, making it
the current row.

DF
A : TRUE

B : FALSE

C:

rP
D:

Q.no 40. In the following JDBC drivers which is known as fully java driver?

A : Native-API driver
te
B : Network Protocol driver
as
C : Thin driver

D : Both 2& 3
M

Q.no 41. Which one of the following scopes does the attribute in servlet is an object that can be
set, get or removed?

A : session scope
in

B : request scope

C : application scope
ed

D : Mentioned all of above

Q.no 42. What implementation of Iterator can traverse a collection in both directions?
at

A : Iterator

B : ListIterator
re

C : SetInterator

D : MapInterator

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 21/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 43. Which method is used to find the number of column in ResultSet?

r
A : getNumberOfColumn()

i to
B : getMaxColumn()

C : getColumnCount()

Ed
D : getColumns()

Q.no 44. Which of the following tag is used to declare error pages in the Deployment Descriptor
for the entire Web Apllication?

DF
A : <error>

B : <page>

C : <errorPage>

rP
D : <error-page>

Q.no 45. What is the Output of following Java Program? q34.jpg

A : 12885
te
B : 12845
as
C : 58881

D : 54881
M

Q.no 46. Servlet technology is used to create web application

A : TRUE

B : FALSE
in

C:

D:
ed

Q.no 47. Which can generate HTML dynamically on the client but can hardly interact with the
web server to perform complex tasks like database access and image processing etc. in JSP?
at

A : vs.Static HTML

B : vs.Server-Side Includes
re

C: vs.Pure Servlets

D : Vs.JavaScript

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 22/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 48. Which of the following is true about Initialization phase in JSP life cycle?

r
A : When a container loads a JSP it invokes the jspInit() method before servicing any requests

i to
B : Container invokes _jspService() method during Initialization phase.

C : Both of the above.

Ed
D : Container invokes _jspDestroy() method during Initialization phase.

Q.no 49. Which of the following is true about autoFlush Attribute?

A : The autoFlush attribute can specify that buffered output should be flushed automatically when the

DF
buffer is filled.

B : The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.

C : Both of the above

rP
D : None

Q.no 50. Which class can handle any type of request so that it is protocol-independent?

A : GenericServlet
te
B : HttpServlet
as
C : Both 1 & 2

D : ContextServlet
M

Q.no 51. We can get the Database details using?

A : DatabaseDetails

B : DatabaseServerData
in

C : DatabaseRawData

D : DatabaseMetaData
ed

Q.no 52. Where the stored procedures reside?

A : In side server memory


at

B : In side cache

C : Inside database
re

D : In side browser

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 23/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 53. JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you

r
can do with Java servlets.

i to
A : TRUE

B : FALSE

Ed
C:

D:

Q.no 54. Which JDBC driver Types are for use over communications networks?

DF
A : Type 3 only

B : Type 4 only

C : Both Type 3 and Type 4

rP
D : Neither Type 3 nor Type 4

Q.no 55. Which implicit object of JSP is equivalent to this variable of Java programming
language?
te
A : page

B : pageContext
as

C : config

D : application
M

Q.no 56. Which allows the storage of a null key and many null values?

A : Hashtable
in

B : HashMap

C : Both
ed

D : Tree

Q.no 57. What the Class.forName() does?


at

A : Established the connection with database

B : Load the specified driver class


re

C : Register a driver

D : none of these

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 24/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 58. Which of the following is true about Cleanup phase in JSP life cycle?

r
A : The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a

i to
container.

B : The jspDestroy() method is the JSP equivalent of the destroy method for servlets.

Ed
C : Both of the above

D : None

Q.no 59. What is the output of the prg. q33.jpg

DF
A : abcdef

B : defabc

C : abcabc

rP
D : defdef

Q.no 60. Deque and Queue are derived from:

A : AbstractList
te
B : Collection
as
C : AbstractCollection

D : List
M

Q.no 1. Which type of driver provides JDBC access via one or more ODBC drivers?

A : Type 1 driver

B : Type 2 driver
in

C : Type 3 driver

D: Type 4 driver
ed

Q.no 2. Which object is created by the web container at time of deploying the project?

A : ServletConfig
at

B : ServletContext

C : Both A & B
re

D : HttpSession

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 25/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 3. Which of the following manages a list of database drivers in JDBC?

r
A : DriverManager

i to
B : JDBC driver

C : Connection

Ed
D : Statement

Q.no 4. Which type of driver converts JDBC calls into the network protocol used by the database
management system directly?

DF
A : Type 1 driver

B : Type 2 driver

C : Type 3 driver

rP
D : Type 4 driver

Q.no 5. How can you retrieve information from a ResultSet?

A : By invoking the method get(…, String type) on the ResultSet, where type is the database type
te
B : By invoking the method get(…, Type type) on the ResultSet, where Type is an object which
represents a database type
as

C : By invoking the method getValue(…), and cast the result to the desired Java type

D : By invoking the special getter methods on the ResultSet: getString(…), getBoolean (…),
M

getClob(…),…

Q.no 6. JSP includes a mechanism for defining

A : static attributes
in

B : local attributes

C : dynamic attributes
ed

D : global attributes

Q.no 7. pageContext is an implicit object in jsp.


at

A : TRUE

B : FALSE
re

C:

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 26/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D:

r
Q.no 8. What is the maximum size of cookie?

i to
A : 4 KB

B : 4 MB

Ed
C : 4 bytes

D : 40 KB

Q.no 9. Which of the following is true about servlets?

DF
A : Servlets execute within the address space of web server

B : Servlets are platform-independent because they are written in java

rP
C : Servlets can use the full functionality of the Java class libraries

D : Servlets execute within the address space of web server, platform independent and uses the
functionality of java class libraries

Q.no 10. Which of the following code is used to get PrintWriter object in servlet?
te
A : respose.getWriter()
as
B : request.getWriter()

C : new PrintWriter()
M

D : PrintWriter()

Q.no 11. Which of this method is used to avoid polling in Java?

A : wait()
in

B : notify()

C : notifyAll()
ed

D : mentioned all of above

Q.no 12. What is the full form of JSP?


at

A : Java servlet program

B : Java server pages


re

C : Java server program

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 27/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Java Same pages

r
Q.no 13. The hasNext method returns true if the iteration has more elements.

i to
A : True

B : False

Ed
C:

D:

Q.no 14. Which tag is used to execute java source code in JSP?

DF
A : Declaration Tag

B : Scriptlet tag

rP
C : Expression tag

D : html tag

Q.no 15. What is maximum thread priority in Java


te
A : 10

B : 12
as

C:5

D:8
M

Q.no 16. What are scripting languages?

A : The programming languages that pre decide the web page content
in

B : The programming languages that are simpler and offer same protection

C : The programming languages that trade off simplicity for protection


ed

D : Complicates application

Q.no 17. What is Collection in Java?


at

A : A group of objects

B : A group of classes
re

C : A group of interfaces

D : group of functions
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 28/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 18. It is a collection that cannot contain duplicate element

r
A : List

i to
B : Queue

C : Set

Ed
D : Collection

Q.no 19. Which of the below is not a session tracking method?

A : URL rewriting

DF
B : History

C : Cookies

rP
D : SSL sessions

Q.no 20. Which of these classes is not part of Java’s collection framework?

A : Maps
te
B : Array

C : Stack
as

D : Queue

Q.no 21. State true or false: Executing programs at the client side is slower than executing
M

programs on the server

A : TRUE

B : FALSE
in

C:

D:
ed

Q.no 22. Which of these standard collection classes implements a dynamic array?

A : AbstractList
at

B : LinkedList

C : ArrayList
re

D : AbstractSet

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 29/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 23. Which option is true about session scope?

r
A : Objects are accessible only from the page in which they are created

i to
B : Objects are accessible only from the pages which are in same session

C : Objects are accessible only from the pages which are processing the same request

Ed
D : Objects are accessible only from the pages which reside in same application

Q.no 24. Which of these iterators can be used only with List?

A : SetIterator

DF
B : ListIterator

C : Literator

rP
D : Comparator

Q.no 25. Which class provides stream to read binary data such as image etc. from the request
object?

A : ServletInputStream
te
B : ServletOutputStream
as
C : Both 1 & 2

D : InputStream
M

Q.no 26. Suppose that you would like to create an instance of a new Map that has an iteration
order that is the same as the iteration order of an existing instance of a Map. Which concrete
implementation of the Map interface should be used for the new instance?

A : TreeMap
in

B : HashMap

C : LinkedHashMap
ed

D : The answer depends on the implementation of the existing instance.

Q.no 27. What is Servlet Hierachy :i) GenericServlet ii)HttpServlet iii) Servlet iv) MyServlet
at

A : I,ii,iii,iv

B : iii,ii,iv,i
re

C : iii,I,ii,iv

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 30/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : ii,I,iv,iii

r
Q.no 28. Which is not a directive?

i to
A : include

B : page

Ed
C : export

D : useBean

Q.no 29. Which object of HttpSession can be used to view and manipulate information about a

DF
session?

A : session identifier

B : creation time

rP
C : last accessed time

D : Mentioned all of above

Q.no 30. Which method is used to make main thread to wait for all child threads
te
A : Join ()
as
B : Sleep ()

C : Wait ()
M

D : Stop ()

Q.no 31. Which method is used to execute a SQL select statement and returns a results?

A : Execute( )
in

B : cancel ( )

C : executeQuery()
ed

D : Open ( )

Q.no 32. Which Interface allows a servlet to obtain configutation when needed
at

A : ServletRequest

B : ServletResponse
re

C : Servlet

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 31/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : ServletConfig

r
Q.no 33. JDBC technology-based drivers generally fit into how many categories?

i to
A:4

B:3

Ed
C:2

D:5

Q.no 34. What happens if you call the method close() on a ResultSet object?

DF
A : the method close() does not exist for a ResultSet. Only Connections can be closed.

B : the database and JDBC resources are released

rP
C : you will get a SQLException, because only Statement objects can close ResultSets

D : The ResultSet, together with the Statement which created it and the Connection from which the
Statement was retrieved, will be closed and release all database and JDBC resources

Q.no 35. The following attribute in Taglib directive is used to distinguish the custom tag from
te
other library custom tag.

A : Page
as

B : Prefix

C : URI
M

D : URL

Q.no 36. Which of the following is not a valid attribute of a page directives?
in

A : language

B : extend
ed

C : export

D : import
at

Q.no 37. JSP page perform request processing by calling which method?

A : jsp_Service
re

B : service

C : jspService

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 32/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : _jspService

r
Q.no 38. JDBC is a Java API that is used to connect and execute query to the database

i to
A : TRUE

B : FALSE

Ed
C:

D:

Q.no 39. Which method is used for an SQL statement that is executed frequently?

DF
A : prepareStatement

B : prepareCall

rP
C : createStatement

D : simpleStatement

Q.no 40. Which driver uses ODBC driver to connect to the database?
te
A : JDBC-ODBC bridge driver

B : Native - API driver


as

C : Network Protocol driver

D : Thin driver
M

Q.no 41. Type-2 driver called as

A : Native-protocol, pure Java driver


in

B : JDBC-Net, pure Java driver

C : Native-API, partly Java driver


ed

D : JDBC-ODBC Bridge plus ODBC driver

Q.no 42. RowSet is belong to which package?


at

A : java.sql

B : javax.sql
re

C : java.jdbc

D : javax.jdbc
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 33/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 43. Which method in session tracking is used in a bit of information that is sent by a web

r
server to a browser and which can later be read back from that browser?

i to
A : HttpSession

B : URL rewriting

Ed
C : Cookies

D : Hidden form fields

Q.no 44. If your Java application is accessing multiple types of databases at the same time, which
type of driver is the preferred driver.

DF
A : Type-1

B : Type-2

C : Type-3

rP
D : Type-4

Q.no 45. Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web
server and the DBMS are running on the same machine?
te
A : Type 1 only
as
B : Type 2 only

C : Both Type 3 and Type 4


M

D : All the above

Q.no 46. Which of the following attributes are mandatory in <jsp:getProperty /> tag?

A : name, property
in

B : type, id

C : name, type
ed

D : id, property

Q.no 47. Which attribute specifies a JSP page that should process any exceptions thrown but not
caught in the current page?
at

A : The ErrorPage Attribute


re

B : The IsErrorPage Attribute

C : Both 1 & 2

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 34/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : PageAttribute

r
Q.no 48. Which are the examples of Application Server?

i to
A : Tomcat

B : Weblogic

Ed
C : JBoss

D : Both 2 and 3

Q.no 49. In HTTP Request what asks for the loopback of the request message, for testing or for

DF
troubleshooting?

A : PUT

B : OPTIONS

rP
C : DELETE

D : TRACE

Q.no 50. which tag can hold any Java language expression that can be used as an argument
te
to out.println() method.

A : Expression tag
as

B : Declaration Tag/label>

C : Directive Tag
M

D : Scriplet Tag

Q.no 51. Which HTTP Request method is non-idempotent?


in

A : GET

B : POST
ed

C : Both 1 & 2

D : ENV
at

Q.no 52. Which JDBC driver Type(s) can be used in either applet or servlet code?

A : Both Type 1 and Type 2


re

B : Both Type 1 and Type 3

C : Both Type 3 and Type 4

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 35/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Type 4 only

r
Q.no 53. Which directive tells the Web Container to copy everything in the included file and

i to
paste it into current JSP file?

A : taglib

Ed
B : Page

C : include

D : exclude

DF
Q.no 54. By default cursor is pointing to

A : Column Header

B : First Record

rP
C : Last Record

D : Middle Record

Q.no 55. Which of the following is true about info Attribute?


te
A : The info attribute lets you provide a description of the JSP
as
B : The info attribute is used by JSP container for optimization of generated servlet code.

C : Both of the above.


M

D : None

Q.no 56. How do you know in your Java program that a SQL warning is generated as a result of
executing a SQL statement in the database?
in

A : You must catch the checked SQLException which is thrown by the method which executes the
statement

B : You must catch the unchecked SQLWarningException which is thrown by the method which
ed

executes the statement

C : You must invoke the getWarnings() method on the Statement object (or a sub interface thereof)

D : You must query the ResultSet object about possible warnings generated by the database
at

Q.no 57. Which is faster and uses less memory?


re

A : ListEnumeration

B : Iterator

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 36/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Enumeartion

r
D : ListIterator

i to
Q.no 58. The default capacity of a ArrayList is:

A : 12

Ed
B : 16

C:1

D : 10

DF
Q.no 59. Which of the following is true about Initialization phase in JSP life cycle?

A : When a container loads a JSP it invokes the jspInit() method before servicing any requests

rP
B : Container invokes _jspService() method during Initialization phase.

C : Both of the above.

D : Container invokes _jspDestroy() method during Initialization phase.


te
Q.no 60. Which can generate HTML dynamically on the client but can hardly interact with the
web server to perform complex tasks like database access and image processing etc. in JSP?
as
A : vs.Static HTML

B : vs.Server-Side Includes
M

C: vs.Pure Servlets

D : Vs.JavaScript

Q.no 1. Which of the following describes the correct sequence of the steps involved in making a
in

connection with a database. 1. Loading the driver


2. Process the resul

A : 1,3,4,2
ed

B : 1,2,3,4

C : 2,1,3,4
at

D : 4,1,2,3

Q.no 2. Which of the following method can be used to create a connection object?
re

A : getConnection(String url,String user,String pass)

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 37/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : getConnection(String url)

r
C : getConnection(String url,Properties Prop)

i to
D : All mentioned used

Q.no 3. Which action tags are used in JSP for developing web application with Java Bean?

Ed
A : jsp:useBean

B : jsp:setProperty

C : jsp:getProperty

DF
D : Both B & C

Q.no 4. Which of the following stops execution of a thread?

rP
A : Calling SetPriority() method on a Thread object

B : Calling notify() method on an object

C : Calling wait() method on an object


te
D : Calling read() method on an InputStream object

Q.no 5. Which method is used to check if a thread is running?


as

A : isAlive()

B : run ()
M

C : alive ()

D : keepAlive()
in

Q.no 6. Which statements is/are correct

A : On calling Thread start () method a new thread get created


ed

B : Thread start () method call run () method internally

C : Thread run () method can also be called directly to create thread.


at

D : Both 1 and 2

Q.no 7. Which of these are types of multitasking?


re

A : Process based

B : Thread based
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 38/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Process and Thread based

r
D : Scheduler based

i to
Q.no 8. Which of the following is stored at client side?

A : URL rewriting

Ed
B : Hidden form fields

C : SSL sessions

D : Cookies

DF
Q.no 9. Execution of a java thread begins on which method call?

A : Start ()

rP
B: Run ()

C : Execute ()

D: Launch ()
te
Q.no 10. What is, in terms of JDBC, a DataSource?

A : A DataSource is the basic service for managing a set of JDBC drivers


as

B : A DataSource is the Java representation of a physical data source

C : A DataSource is a registry point for JNDI-services


M

D : A DataSource is a factory of connections to a physical data source

Q.no 11. Which attribute specifies threding model in page directive in jsp.
in

A : info

B : threadmod
ed

C : isThreadSafe

D : language
at

Q.no 12. What is multithreaded programming?

A : It’s a process in which two different processes run simultaneously


re

B : It’s a process in which two or more parts of same process run simultaneously

C : It’s a process in which many different process are able to access same information
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 39/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : It’s a process in which a single process can access information from many sources

r
Q.no 13. Which of the following will ensure the thread will be in running state?

i to
A : yield()

B : notify()

Ed
C : wait()

D : Thread.killThread()

Q.no 14. The database system compiles query when it is

DF
A : Executed

B : Initiated

rP
C : Prepared

D : Invoked

Q.no 15. Which object stores references to the request and response objects?
te
A : sessionContext

B : pageContext
as

C : HttpSession

D : sessionAttribute
M

Q.no 16. State true or false . Does the JDBC-ODBC Bridge support multiple concurrent open
statements per connection?

A : TRUE
in

B : FALSE

C:
ed

D:

Q.no 17. Which statements about JDBC are true?


at

A : JDBC is an API to connect to relational-, object- and XML data sources

B : JDBC stands for Java DataBase Connectivity


re

C : JDBC is an API to access relational databases, spreadsheets and flat files

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 40/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Both 2 and 3

r
Q.no 18. Which of the following method can be used to get the multiple values of a parameter like

i to
checkbox data?

A : request.getParameter()

Ed
B : request.getParameterValues()

C : request.getParameterNames()

D : request.getFunctionNames()

DF
Q.no 19. Which tag should be used to pass information from JSP to included JSP?

A : Using <%jsp:page> tag

B : Using <%jsp:param> tag

rP
C : Using <%jsp:import> tag

D : Using <%jsp:useBean> tag

Q.no 20. Which of these methods is used to obtain an iterator to the start of collection?
te
A : start()
as
B : begin()

C : iteratorSet()
M

D : iterator()

Q.no 21. How many steps are used to connect any java application using JDBC?

A:5
in

B:4

C:3
ed

D:6

Q.no 22. Which JDBC drivers will run your program?


at

A : The JDBC-ODBC bridge

B : The JDBC driver manager


re

C : The JDBC driver test suite

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 41/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Partly Java Driver

r
Q.no 23. Which implicit object of JSP is associated with the Output Stream of response object?

i to
A : write

B : out

Ed
C : response

D : responseWriter

Q.no 24. Which of the below does not implement Map interface?

DF
A : HashMap

B : Hashtable

rP
C : EnumMap

D : Vector

Q.no 25. Which method in Transaction makes all changes.


te
A : Commit()

B : rollback()
as

C : Savepoint()

D : getAutoCommit()
M

Q.no 26. Which interface is used to access information about the database.

A : Database
in

B : DatabaseMetaData

C : Result Set
ed

D : GetData

Q.no 27. What is the relation between hashset and hashmap?


at

A : HashSet internally implements HashMap

B : HashMap internally implements HashSet


re

C : HashMap is the interface; HashSet is the concrete class

D : HashSet is the interface; HashMap is the concrete class


https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 42/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 28. What is the Output of following Java Program? q24.jpg

r
A : Geeks for Geeks GeeksforGeeks

i to
B : GeeksforGeeks GeeksforGeeks

C : Runtime Error

Ed
D : Compilation Error

Q.no 29. Which method must be implemented by a Java thread?

A: run()

DF
B : execute()

C : start()

rP
D : paint()

Q.no 30. The method forward(request, response) will

A : return back to the same method from where the forward was invoked
te
B : not return back to the same method from where the forward was invoked and the web pages
navigation continues
as
C : Both 1 and 2 are correct

D : None
M

Q.no 31. Which packages represent interfaces and classes for servlet API?

A : javax.servlet

B : javax.servlet.http
in

C : Both 1 & 2

D : java
ed

Q.no 32. If a priority of a java thread is 3 then the default priority of its child thread will be

A:0
at

B:1

C:5
re

D:3

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 43/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 33. The Mechanism used by the web container to store session information for a particular

r
user is

i to
A : Request Management

B : Container Management

Ed
C : Response Management

D : Session Management

Q.no 34. Protocol used for handling Get and Post requests are

DF
A : SMTP

B : FTP

C : HTTP

rP
D : POP3

Q.no 35. Which of these interface declares core method that all collections will have?

A : set
te
B : EventListner
as
C : Comparator

D : Collection
M

Q.no 36. Which of the scripting of JSP not putting content into service method of the converted
servlet?

A : Declarations
in

B : Scriptlets

C : Expressions
ed

D : Include

Q.no 37. What is used to execute parameterized query?


at

A : Statement interface

B : PreparedStatement interface
re

C : ResultSet interface

D : None of the above

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 44/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 38. Which of these method wakes up all the threads?

r
A : wakeAll()

i to
B : notify()

C : start()

Ed
D : notifyAll()

Q.no 39. Which of the following statements are correct about the status of the Http response.

A : A status of 200 to 299 signifies that the request was successful

DF
B : A status of 300 to 399 are informational messages

C : A status of 400 to 499 indicates an error in the server

rP
D : A status of 500 to 599 indicates an error in the client

Q.no 40. Which of the following is not a directive in JSP?

A : page directive
te
B : include directive

C : taglib directive
as

D : command directive

Q.no 41. Which method is used to find the number of column in ResultSet?
M

A : getNumberOfColumn()

B : getMaxColumn()
in

C : getColumnCount()

D : getColumns()
ed

Q.no 42. Which class can handle any type of request so that it is protocol-independent?

A : GenericServlet
at

B : HttpServlet

C : Both 1 & 2
re

D : ContextServlet

Q.no 43. What implementation of Iterator can traverse a collection in both directions?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 45/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : Iterator

r
B : ListIterator

i to
C : SetInterator

D : MapInterator

Ed
Q.no 44. Servlet technology is used to create web application

A : TRUE

B : FALSE

DF
C:

D:

rP
Q.no 45. Which JDBC driver Types are for use over communications networks?

A : Type 3 only

B : Type 4 only
te
C : Both Type 3 and Type 4

D : Neither Type 3 nor Type 4


as

Q.no 46. Deque and Queue are derived from:

A : AbstractList
M

B : Collection

C : AbstractCollection
in

D : List

Q.no 47. We can get the Database details using?


ed

A : DatabaseDetails

B : DatabaseServerData
at

C : DatabaseRawData

D : DatabaseMetaData
re

Q.no 48. Which of the following tag is used to declare error pages in the Deployment Descriptor
for the entire Web Apllication?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 46/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : <error>

r
B : <page>

i to
C : <errorPage>

D : <error-page>

Ed
Q.no 49. Which of the following is true about autoFlush Attribute?

A : The autoFlush attribute can specify that buffered output should be flushed automatically when the
buffer is filled.

DF
B : The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.

C : Both of the above

D : None

rP
Q.no 50. Which allows the storage of a null key and many null values?

A : Hashtable

B : HashMap
te
C : Both
as
D : Tree

Q.no 51. What is the Output of following Java Program? q34.jpg


M

A : 12885

B : 12845

C : 58881
in

D : 54881

Q.no 52. Which of the following is true about Cleanup phase in JSP life cycle?
ed

A : The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a
container.
at

B : The jspDestroy() method is the JSP equivalent of the destroy method for servlets.

C : Both of the above


re

D : None

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 47/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 53. Which implicit object of JSP is equivalent to this variable of Java programming

r
language?

i to
A : page

B : pageContext

Ed
C : config

D : application

Q.no 54. What is the output of the prg. q33.jpg

DF
A : abcdef

B : defabc

C : abcabc

rP
D : defdef

Q.no 55. Type-2 driver called as

A : Native-protocol, pure Java driver


te
B : JDBC-Net, pure Java driver
as
C : Native-API, partly Java driver

D : JDBC-ODBC Bridge plus ODBC driver


M

Q.no 56. What the Class.forName() does?

A : Established the connection with database

B : Load the specified driver class


in

C : Register a driver

D : none of these
ed

Q.no 57. Which one of the following scopes does the attribute in servlet is an object that can be
set, get or removed?
at

A : session scope

B : request scope
re

C : application scope

D : Mentioned all of above

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 48/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 58. JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you

r
can do with Java servlets.

i to
A : TRUE

B : FALSE

Ed
C:

D:

Q.no 59. Where the stored procedures reside?

DF
A : In side server memory

B : In side cache

C : Inside database

rP
D : In side browser

Q.no 60. Which directive tells the Web Container to copy everything in the included file and
paste it into current JSP file?
te
A : taglib

B : Page
as

C : include

D : exclude
M

Q.no 1. Which of this method is used to avoid polling in Java?

A : wait()
in

B : notify()

C : notifyAll()
ed

D : mentioned all of above

Q.no 2. What is the full form of JSP?


at

A : Java servlet program

B : Java server pages


re

C : Java server program

D : Java Same pages

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 49/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 3. What is a Expression in JSP?

r
A : <%= %>

i to
B : <% %>

C : <* *>

Ed
D : <? ?>

Q.no 4. Which JSP life cycle is in the correct order?

A : Translation → Initializing → Request Processing → Destroying

DF
B : Translation → Request Processing → Initializing → Destroying

C:

rP
D:

Q.no 5. What will happen if two thread of the same priority are called to be processed
simultaneously?

A : Anyone will be executed first lexographically


te
B : Both of them will be executed simultaneously
as
C : None of them will be executed

D : It is dependent on the operating system


M

Q.no 6. JDBC is a which type of inerface which means that it is used to invoke SQL commands
directly

A : low-level
in

B : middle-level

C : higher-level
ed

D : user

Q.no 7. PageContext is instance of which class?


at

A : javax.servlet.ServletContext

B : javax.servlet.ServletConfig
re

C : javax.servlet.jsp.PageContext

D : javax.servlet.Application

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 50/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 8. Which of the following is a correct constructor for thread?

r
A : Thread(Runnable a, String str)

i to
B : Thread(int priority)

C : Thread(Runnable a, int priority)

Ed
D : Thread(Runnable a, ThreadGroup t)

Q.no 9. ODBC is not appropriate for direct use from java because it uses a

A : C interface

DF
B : C# interface

C : java interface

rP
D : Both A and C

Q.no 10. Which method of stack returns the element on the top of the stack by not removing it

A : search()
te
B : pop()

C : peek()
as

D : push()

Q.no 11. Choose the statement that best describes the relationship between JSP and servlets:
M

A : Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime usage.

B : JSP and servlets are unrelated technologies.


in

C : Servlets and JSP are competing technologies for handling web requests. Servlets are being
superseded by JSP, which is preferred. The two technologies are not useful in combination.

D : JSPs are built on servlet semantics and all JSPs are compiled to servlets for runtime usage.
ed

Q.no 12. Choose an incorrect statement from the following.

A : . JSP pages are easier to maintain than a servlet.


at

B : The Web Container translate a Servlet into JSP page

C : JSP is built on Java Technology so it is platform independent


re

D : A JSP page seperates presentation and business logic.

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 51/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 13. Which type of Statement can execute parameterized queries?

r
A : PreparedStatement

i to
B : ParameterizedStatement

C : ParameterizedStatement and CallableStatement

Ed
D : Executable Statement

Q.no 14. Servlets handle multiple simultaneous requests by using threads.

A : TRUE

DF
B : FALSE

C:

rP
D:

Q.no 15. Which of these statements is incorrect?

A : By multithreading CPU idle time is minimized, and we can take maximum use of it
te
B : By multitasking CPU idle time is minimized, and we can take maximum use of it

C : Two thread in Java can have the same priority


as

D : A thread can exist only in two states, running and blocked

Q.no 16. Which class can handle any type of request so that it is protocol-independent?
M

A : GenericServlet

B : HttpServlet
in

C : Both A & B

D : Servlet
ed

Q.no 17. Which of these methods sets every element of a List to a specified object?

A : set()
at

B : fill()

C : Complete()
re

D : add()

Q.no 18. What is JDBC?


https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 52/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : java compiler

r
B : Java API

i to
C : Java interpreter

D : Both A and B

Ed
Q.no 19. The life cycle of servlet is managed by

A : servlet container

B : servlet context

DF
C : both a and b

D : None of above

rP
Q.no 20. The Interface ResultSet has a method getMataData() that returns

A : Tuple

B : Value
te
C : Object

D : Result
as

Q.no 21. Which method is used to send the same request and response objects to another servlet
in RequestDispatcher ?
M

A : forward()

B : sendRedirect()

C : Both 1 & 2
in

D : send()

Q.no 22. “out” is implicit object of which class?


ed

A : javax.servlet.jsp.PrintWriter

B : javax.servlet.jsp.SessionWriter
at

C : javax.servlet.jsp.SessionPrinter

D : javax.servlet.jsp.JspWriter
re

Q.no 23. How can you start a database transaction in the database?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 53/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : By asking a Transaction object to your Connection, and calling the method begin() on it

r
B : By asking a Transaction object to your Connection, and setting the autoCommit property of the

i to
Transaction to false

C : By calling the method beginTransaction() on the Connection object

Ed
D : By setting the autoCommit property of the Connection to false, and execute a statement in the
database

Q.no 24. Which JDBC product components does the Java software provide?

A : The JDBC driver manager

DF
B : The JDBC driver test suite

C : The JDBC-ODBC bridge

D : Provide all mentioned

rP
Q.no 25. Which result set generally does not show changes to the underlying database that are
made while it is open. The membership, order, and column values of rows are typically fixed
when the result set is created?
te
A : TYPE_FORWARD_ONLY

B : TYPE_SCROLL_INSENSITIVE
as

C : TYPE_SCROLL_SENSITIVE

D : TYPE_SCROLL
M

Q.no 26. A JSP page consists of which tags?

A : HTML tags
in

B : JSP tags

C : Both 1 & 2
ed

D : Notag

Q.no 27. Which method is used to make main thread to wait for all child threads

A : Join ()
at

B : Sleep ()
re

C : Wait ()

D : Stop ()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 54/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 28. Which implicit object is only available to a JSP page which is designated as error pages?

r
A : application

i to
B : Throwable

C : runnable

Ed
D : exception

Q.no 29. Which is not a directive?

A : include

DF
B : page

C : export

rP
D : useBean

Q.no 30. Which Interface allows a servlet to obtain configutation when needed

A : ServletRequest
te
B : ServletResponse

C : Servlet
as

D : ServletConfig

Q.no 31. Using mail API we cannot send mail from a servlet.
M

A : TRUE

B : False
in

C:

D:
ed

Q.no 32. What happens if you call deleteRow() on a ResultSet object?

A : The row you are positioned on is deleted from the ResultSet, but not from the database.
at

B : The row you are positioned on is deleted from the ResultSet and from the database

C : The result depends on whether the property synchronizeWithDataSource is set to true or false
re

D : You will get a compile error: the method does not exist because you can not delete rows from a
ResultSet

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 55/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 33. Which method we implement from Runnable interface?

r
A : Run ()

i to
B : Start ()

C : Execute ()

Ed
D : call ()

Q.no 34. Which type of ServletEngine is a server that includes built-in support for servlets?

A : Add-on ServletEngine

DF
B : Embedded ServletEngine

C : Standalone ServletEngine

rP
D : Dowloaded ServletEngine

Q.no 35. Which of these standard collection classes implements a dynamic array?

A : AbstractList
te
B : LinkedList

C : ArrayList
as

D : AbstractSet

Q.no 36. Which class has traditionally been the backbone of the JDBC architecture?
M

A : the JDBC driver manager

B : The JDBC driver test suite


in

C : The JDBC-ODBC bridge

D : Java API Bridge


ed

Q.no 37. State true or false: Executing programs at the client side is slower than executing
programs on the server

A : TRUE
at

B : FALSE

C:
re

D:

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 56/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 38. Which of these method wakes up the first thread that called wait()?

r
A : wait()

i to
B : notify()

C : start()

Ed
D : notifyAll()

Q.no 39. Which methods are used to bind the objects on HttpSession instance and get the
objects?

DF
A : setAttribute()

B : getAttribute()

C : Both A & B()

rP
D : putAttribute()

Q.no 40. Which of the following action variable is used to include a file in JSP?

A : jsp:setProperty
te
B : jsp:getProperty
as
C : jsp:include

D : jsp:plugin
M

Q.no 41. Which can generate HTML dynamically on the client but can hardly interact with the
web server to perform complex tasks like database access and image processing etc. in JSP?

A : vs.Static HTML
in

B : vs.Server-Side Includes

C: vs.Pure Servlets
ed

D : Vs.JavaScript

Q.no 42. Which of the following attributes are mandatory in <jsp:getProperty /> tag?
at

A : name, property

B : type, id
re

C : name, type

D : id, property

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 57/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 43. In HTTP Request what asks for the loopback of the request message, for testing or for

r
troubleshooting?

i to
A : PUT

B : OPTIONS

Ed
C : DELETE

D : TRACE

Q.no 44. By default cursor is pointing to

DF
A : Column Header

B : First Record

C : Last Record

rP
D : Middle Record

Q.no 45. The default capacity of a ArrayList is:

A : 12
te
B : 16
as
C:1

D : 10
M

Q.no 46. Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web
server and the DBMS are running on the same machine?

A : Type 1 only
in

B : Type 2 only

C : Both Type 3 and Type 4


ed

D : All the above

Q.no 47. Which JDBC driver Type(s) can be used in either applet or servlet code?
at

A : Both Type 1 and Type 2

B : Both Type 1 and Type 3


re

C : Both Type 3 and Type 4

D : Type 4 only

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 58/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 48. which tag can hold any Java language expression that can be used as an argument

r
to out.println() method.

i to
A : Expression tag

B : Declaration Tag/label>

Ed
C : Directive Tag

D : Scriplet Tag

Q.no 49. RowSet is belong to which package?

DF
A : java.sql

B : javax.sql

C : java.jdbc

rP
D : javax.jdbc

Q.no 50. Which HTTP Request method is non-idempotent?

A : GET
te
B : POST
as
C : Both 1 & 2

D : ENV
M

Q.no 51. Which are the examples of Application Server?

A : Tomcat

B : Weblogic
in

C : JBoss

D : Both 2 and 3
ed

Q.no 52. Which attribute specifies a JSP page that should process any exceptions thrown but not
caught in the current page?
at

A : The ErrorPage Attribute

B : The IsErrorPage Attribute


re

C : Both 1 & 2

D : PageAttribute

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 59/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 53. Which of the following is true about Initialization phase in JSP life cycle?

r
A : When a container loads a JSP it invokes the jspInit() method before servicing any requests

i to
B : Container invokes _jspService() method during Initialization phase.

C : Both of the above.

Ed
D : Container invokes _jspDestroy() method during Initialization phase.

Q.no 54. Which is faster and uses less memory?

A : ListEnumeration

DF
B : Iterator

C : Enumeartion

rP
D : ListIterator

Q.no 55. Which method is used to find the number of column in ResultSet?

A : getNumberOfColumn()
te
B : getMaxColumn()

C : getColumnCount()
as

D : getColumns()

Q.no 56. How do you know in your Java program that a SQL warning is generated as a result of
M

executing a SQL statement in the database?

A : You must catch the checked SQLException which is thrown by the method which executes the
statement
in

B : You must catch the unchecked SQLWarningException which is thrown by the method which
executes the statement

C : You must invoke the getWarnings() method on the Statement object (or a sub interface thereof)
ed

D : You must query the ResultSet object about possible warnings generated by the database

Q.no 57. If your Java application is accessing multiple types of databases at the same time, which
type of driver is the preferred driver.
at

A : Type-1
re

B : Type-2

C : Type-3

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 60/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Type-4

r
Q.no 58. Which method in session tracking is used in a bit of information that is sent by a web

i to
server to a browser and which can later be read back from that browser?

A : HttpSession

Ed
B : URL rewriting

C : Cookies

D : Hidden form fields

DF
Q.no 59. Which of the following is true about info Attribute?

A : The info attribute lets you provide a description of the JSP

B : The info attribute is used by JSP container for optimization of generated servlet code.

rP
C : Both of the above.

D : None

Q.no 60. What is the output of the prg. q33.jpg


te
A : abcdef
as
B : defabc

C : abcabc
M

D : defdef

Q.no 1. Which of the following method can be used to get the multiple values of a parameter like
checkbox data?
in

A : request.getParameter()

B : request.getParameterValues()
ed

C : request.getParameterNames()

D : request.getFunctionNames()
at

Q.no 2. Which of the below is not a session tracking method?

A : URL rewriting
re

B : History

C : Cookies

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 61/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : SSL sessions

r
Q.no 3. What is a Hidden Comment in JSP?

i to
A : <%– –%>

B : <%– %>

Ed
C : <% !!! %>

D : <% &&&%>

Q.no 4. pageContext is an implicit object in jsp.

DF
A : TRUE

B : FALSE

rP
C:

D:

Q.no 5. The database system compiles query when it is


te
A : Executed

B : Initiated
as

C : Prepared

D : Invoked
M

Q.no 6. How can you retrieve information from a ResultSet?

A : By invoking the method get(…, String type) on the ResultSet, where type is the database type
in

B : By invoking the method get(…, Type type) on the ResultSet, where Type is an object which
represents a database type

C : By invoking the method getValue(…), and cast the result to the desired Java type
ed

D : By invoking the special getter methods on the ResultSet: getString(…), getBoolean (…),
getClob(…),…
at

Q.no 7. Which of these methods is used to obtain an iterator to the start of collection?

A : start()
re

B : begin()

C : iteratorSet()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 62/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : iterator()

r
Q.no 8. Which of these are types of multitasking?

i to
A : Process based

B : Thread based

Ed
C : Process and Thread based

D : Scheduler based

Q.no 9. Which method is used to move to next element in a collection?

DF
A : next()

B : move()

rP
C : shuffle()

D : hasNext()

Q.no 10. How can we destroy a session?


te
A : session.discontinue()

B : session.invalidate()
as

C : session.disconnect()

D : session.falsify()
M

Q.no 11. JSP includes a mechanism for defining

A : static attributes
in

B : local attributes

C : dynamic attributes
ed

D : global attributes

Q.no 12. Which of the following is true about servlets?


at

A : Servlets execute within the address space of web server

B : Servlets are platform-independent because they are written in java


re

C : Servlets can use the full functionality of the Java class libraries

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 63/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Servlets execute within the address space of web server, platform independent and uses the

r
functionality of java class libraries

i to
Q.no 13. Which method is used to perform DML statements in JDBC?

A : Execute

Ed
B : executeQuery()

C : executeUpdate()

D : executeResult()

DF
Q.no 14. When doGet() method of servlet gets called?

A : GET request results from a normal request for a URL.

B : The service() method checks the HTTP request type as GET and calls doGet() method.

rP
C : Both of above

D : When Invoked then

Q.no 15. How can you execute a stored procedure in the database?
te
A : Call method execute() on a CallableStatement object
as
B : Call method executeProcedure() on a Statement object

C : Call method execute() on a StoredProcedure object


M

D : Call method run() on a ProcedureCommand object

Q.no 16. What is the meaning of ResultSet.TYPE_SCROLL_INSENSITIVE

A : This means that the ResultSet is insensitive to scrolling


in

B : This means that the Resultset is sensitive to scrolling, but insensitive to updates, i.e. not updateable

C : This means that the ResultSet is sensitive to scrolling, but insensitive to changes made by others
ed

D : The meaning depends on the type of data source, and the type and version of the driver you use
with this data source
at

Q.no 17. Which Interface in java is not allowing null values?

A : HashMap
re

B : TreeMap

C : LinkedHashMap

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 64/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Set

r
Q.no 18. Which attribute specifies threding model in page directive in jsp.

i to
A : info

B : threadmod

Ed
C : isThreadSafe

D : language

Q.no 19. It is a collection that cannot contain duplicate element

DF
A : List

B : Queue

rP
C : Set

D : Collection

Q.no 20. Why will you set auto commit mode to false?
te
A : To increase the performance

B : To maintain the integrity of business process


as

C : To use distributed transactions

D : Does all mentioned


M

Q.no 21. What happens if you call the method close() on a ResultSet object?

A : the method close() does not exist for a ResultSet. Only Connections can be closed.
in

B : the database and JDBC resources are released

C : you will get a SQLException, because only Statement objects can close ResultSets
ed

D : The ResultSet, together with the Statement which created it and the Connection from which the
Statement was retrieved, will be closed and release all database and JDBC resources

Q.no 22. What is the Output of following Java Program? q23.jpg


at

A : java.util.LinkedList

B : String
re

C : Compiler Error

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 65/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Syntax Error

r
Q.no 23. Which attribute uniquely identification element?

i to
A : ID

B : Class

Ed
C : Name

D : Scope

Q.no 24. Sessions is a part of the SessionTracking and it is for maintaining the client state at

DF
server side.

A : TRUE

B : False

rP
C:

D:

Q.no 25. Which of the following is not a directive in JSP?


te
A : page directive
as
B : include directive

C : taglib directive
M

D : command directive

Q.no 26. ResultSet object can be moved forward only and it is updatable.

A : TRUE
in

B : FALSE

C:
ed

D:

Q.no 27. What is the Output of following Java Program? q25.jpg


at

A : 11 10 22 5 12 2

B : 2 12 5 22 10 11
re

C : 2 5 10 11 12 22

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 66/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : 22 12 11 10 5 2

r
Q.no 28. Which class provides stream to read binary data such as image etc. from the request

i to
object?

A : ServletInputStream

Ed
B : ServletOutputStream

C : Both 1 & 2

D : InputStream

DF
Q.no 29. In the following JDBC drivers which is known as fully java driver?

A : Native-API driver

B : Network Protocol driver

rP
C : Thin driver

D : Both 2& 3

Q.no 30. Which method is used for an SQL statement that is executed frequently?
te
A : prepareStatement
as
B : prepareCall

C : createStatement
M

D : simpleStatement

Q.no 31. Which statement is true for the class java.util.HashSet?

A : The elements in the collection are ordered.


in

B : The collection is guaranteed to be immutable.

C : The elements in the collection are guaranteed to be unique.


ed

D : The elements in the collection are accessed using a unique key

Q.no 32. What programming language(s) or scripting language(s) does Java Server Pages (JSP)
at

support?

A : VBScript only
re

B : Jscript only

C : Java only

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 67/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Text only

r
Q.no 33. The following attribute in Taglib directive is used to distinguish the custom tag from

i to
other library custom tag.

A : Page

Ed
B : Prefix

C : URI

D : URL

DF
Q.no 34. Which method used to return the last time the client sent request associated with
session.

A : getCreationTime()

B : getLastAccessedTime()

rP
C : getMaxInterval()

D : getReturnTime()
te
Q.no 35. Which of these iterators can be used only with List?

A : SetIterator
as

B : ListIterator

C : Literator
M

D : Comparator

Q.no 36. Which of these method wakes up all the threads?


in

A : wakeAll()

B : notify()
ed

C : start()

D : notifyAll()
at

Q.no 37. Which of these method is used to tell the calling thread to give up a monitor and go to
sleep until some other thread enters the same monitor?

A : wait()
re

B : notify()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 68/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : notifyAll()

r
D : sleep()

i to
Q.no 38. What is used to execute parameterized query?

A : Statement interface

Ed
B : PreparedStatement interface

C : ResultSet interface

D : None of the above

DF
Q.no 39. Protocol used for handling Get and Post requests are

A : SMTP

rP
B : FTP

C : HTTP

D : POP3
te
Q.no 40. Which of these is an incorrect form of using method max() to obtain maximum element?

A : max(Collection c)
as

B : max(Collection c, Comparator comp)

C : max(Comparator comp)
M

D : max(List c)

Q.no 41. Which directive tells the Web Container to copy everything in the included file and
paste it into current JSP file?
in

A : taglib

B : Page
ed

C : include

D : exclude
at

Q.no 42. Which can generate HTML dynamically on the client but can hardly interact with the
web server to perform complex tasks like database access and image processing etc. in JSP?
re

A : vs.Static HTML

B : vs.Server-Side Includes

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 69/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C: vs.Pure Servlets

r
D : Vs.JavaScript

i to
Q.no 43. We can get the Database details using?

A : DatabaseDetails

Ed
B : DatabaseServerData

C : DatabaseRawData

D : DatabaseMetaData

DF
Q.no 44. Deque and Queue are derived from:

A : AbstractList

rP
B : Collection

C : AbstractCollection

D : List
te
Q.no 45. What implementation of Iterator can traverse a collection in both directions?

A : Iterator
as

B : ListIterator

C : SetInterator
M

D : MapInterator

Q.no 46. Type-2 driver called as


in

A : Native-protocol, pure Java driver

B : JDBC-Net, pure Java driver


ed

C : Native-API, partly Java driver

D : JDBC-ODBC Bridge plus ODBC driver


at

Q.no 47. Which one of the following scopes does the attribute in servlet is an object that can be
set, get or removed?

A : session scope
re

B : request scope

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 70/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : application scope

r
D : Mentioned all of above

i to
Q.no 48. Servlet technology is used to create web application

A : TRUE

Ed
B : FALSE

C:

D:

DF
Q.no 49. Which JDBC driver Types are for use over communications networks?

A : Type 3 only

rP
B : Type 4 only

C : Both Type 3 and Type 4

D : Neither Type 3 nor Type 4


te
Q.no 50. What the Class.forName() does?

A : Established the connection with database


as

B : Load the specified driver class

C : Register a driver
M

D : none of these

Q.no 51. Which of the following is true about autoFlush Attribute?


in

A : The autoFlush attribute can specify that buffered output should be flushed automatically when the
buffer is filled.

B : The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.
ed

C : Both of the above

D : None
at

Q.no 52. Which of the following is true about Cleanup phase in JSP life cycle?

A : The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a
re

container.

B : The jspDestroy() method is the JSP equivalent of the destroy method for servlets.

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 71/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Both of the above

r
D : None

i to
Q.no 53. Which class can handle any type of request so that it is protocol-independent?

A : GenericServlet

Ed
B : HttpServlet

C : Both 1 & 2

D : ContextServlet

DF
Q.no 54. Which implicit object of JSP is equivalent to this variable of Java programming
language?

A : page

rP
B : pageContext

C : config

D : application
te
Q.no 55. Which allows the storage of a null key and many null values?
as
A : Hashtable

B : HashMap
M

C : Both

D : Tree

Q.no 56. Which of the following tag is used to declare error pages in the Deployment Descriptor
in

for the entire Web Apllication?

A : <error>
ed

B : <page>

C : <errorPage>
at

D : <error-page>

Q.no 57. What is the Output of following Java Program? q34.jpg


re

A : 12885

B : 12845

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 72/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : 58881

r
D : 54881

i to
Q.no 58. JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you
can do with Java servlets.

Ed
A : TRUE

B : FALSE

C:

DF
D:

Q.no 59. Where the stored procedures reside?

A : In side server memory

rP
B : In side cache

C : Inside database

D : In side browser
te
Q.no 60. RowSet is belong to which package?
as
A : java.sql

B : javax.sql
M

C : java.jdbc

D : javax.jdbc

Q.no 1. Which of the following is stored at client side?


in

A : URL rewriting

B : Hidden form fields


ed

C : SSL sessions

D : Cookies
at

Q.no 2. In which Interface keys and values are objects.

A : Map
re

B : Set

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 73/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : TreeSet

r
D : HashSet

i to
Q.no 3. Which type of driver converts JDBC calls into the network protocol used by the database
management system directly?

Ed
A : Type 1 driver

B : Type 2 driver

C : Type 3 driver

DF
D : Type 4 driver

Q.no 4. What is, in terms of JDBC, a DataSource?

A : A DataSource is the basic service for managing a set of JDBC drivers

rP
B : A DataSource is the Java representation of a physical data source

C : A DataSource is a registry point for JNDI-services

D : A DataSource is a factory of connections to a physical data source


te
Q.no 5. Which statements about JDBC are true?
as
A : JDBC is an API to connect to relational-, object- and XML data sources

B : JDBC stands for Java DataBase Connectivity


M

C : JDBC is an API to access relational databases, spreadsheets and flat files

D : Both 2 and 3

Q.no 6. Which of these classes is not part of Java’s collection framework?


in

A : Maps

B : Array
ed

C : Stack

D : Queue
at

Q.no 7. Default value of a java thread is

A:0
re

B:1

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 74/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C:5

r
D : 10

i to
Q.no 8. Name the method defined in the HttpServletResponse class that may be used to set the
content type. Select the one correct answer.

Ed
A : setContent

B : setType

C : setContentType

DF
D : setResponseContentType

Q.no 9. Which action tags are used in JSP for developing web application with Java Bean?

A : jsp:useBean

rP
B : jsp:setProperty

C : jsp:getProperty

D : Both B & C
te
Q.no 10. Which method of ListIterator is used to obtain index of previous element?
as
A : previous()

B : previousIndex()
M

C : back()

D : goBack()

Q.no 11. Which method is used to delete all elements from collection
in

A : clear()

B : reset()
ed

C : delete()

D : refresh()
at

Q.no 12. Which JSP Action tags is used to include the content of another resource, it may be jsp,
html or servlet?
re

A : jsp:include

B : jsp:forward

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 75/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : jsp:plugin

r
D : jsp:param

i to
Q.no 13. Which tag should be used to pass information from JSP to included JSP?

A : Using <%jsp:page> tag

Ed
B : Using <%jsp:param> tag

C : Using <%jsp:import> tag

D : Using <%jsp:useBean> tag

DF
Q.no 14. Which object stores references to the request and response objects?

A : sessionContext

rP
B : pageContext

C : HttpSession

D : sessionAttribute
te
Q.no 15. Which object is created by the web container at time of deploying the project?

A : ServletConfig
as

B : ServletContext

C : Both A & B
M

D : HttpSession

Q.no 16. Which of the following leads to high network traffic?


in

A : URL rewriting

B : Hidden form fields


ed

C : SSL sessions

D : Cookies
at

Q.no 17. Following is an open source DBMS product that runs on UNIX, Linux and Windows

A : MYSQL
re

B : JSP/SQL

C : JDBC/SQL
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 76/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Sun ACCESS

r
Q.no 18. Which of the following code is used to get an attribute in a HTTP Session object in

i to
servlets?

A : session.getAttribute(String name)

Ed
B : session.alterAttribute(String name)

C : session.updateAttribute(String name)

D : session.setAttribute(String name)

DF
Q.no 19. Which of the following stops execution of a thread?

A : Calling SetPriority() method on a Thread object

B : Calling notify() method on an object

rP
C : Calling wait() method on an object

D : Calling read() method on an InputStream object

Q.no 20. ODBC is not appropriate for direct use from java because it uses a
te
A : C interface
as
B : C# interface

C : java interface
M

D : Both A and C

Q.no 21. Which are the session tracking techniques? i. URL rewriting
ii. Using HTTPSession Class
iii.Using response object
in

iv. Using hidden form fields


v. Using cookies
vi. Using servlet object
ed

A : i, ii, iii, vi

B : i, ii, iv, v

C : i, vi, iii, v
at

D : i, ii, iii, v
re

Q.no 22. Which of this method is used to insert value and its key in HashTable?

A : put()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 77/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : set()

r
C : insertElement()

i to
D : addElement()

Q.no 23. What happens if you call deleteRow() on a ResultSet object?

Ed
A : The row you are positioned on is deleted from the ResultSet, but not from the database.

B : The row you are positioned on is deleted from the ResultSet and from the database

C : The result depends on whether the property synchronizeWithDataSource is set to true or false

DF
D : You will get a compile error: the method does not exist because you can not delete rows from a
ResultSet

Q.no 24. JDBC technology-based drivers generally fit into how many categories?

rP
A:4

B:3

C:2
te
D:5
as
Q.no 25. Which of these interface declares core method that all collections will have?

A : set
M

B : EventListner

C : Comparator

D : Collection
in

Q.no 26. Which implicit object of JSP is associated with the Output Stream of response object?

A : write
ed

B : out

C : response
at

D : responseWriter

Q.no 27. RowSet object is non-scrollable and non-updatable by default.


re

A : TRUE

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 78/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : FALSE

r
C:

i to
D:

Q.no 28. What is the Output of following Java Program? q24.jpg

Ed
A : Geeks for Geeks GeeksforGeeks

B : GeeksforGeeks GeeksforGeeks

C : Runtime Error

DF
D : Compilation Error

Q.no 29. Which method in Transaction makes all changes.

rP
A : Commit()

B : rollback()

C : Savepoint()
te
D : getAutoCommit()

Q.no 30. JDBC is a Java API that is used to connect and execute query to the database
as

A : TRUE

B : FALSE
M

C:

D:
in

Q.no 31. Which JDBC product components does the Java software provide?

A : The JDBC driver manager


ed

B : The JDBC driver test suite

C : The JDBC-ODBC bridge


at

D : Provide all mentioned

Q.no 32. How can you start a database transaction in the database?
re

A : By asking a Transaction object to your Connection, and calling the method begin() on it

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 79/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : By asking a Transaction object to your Connection, and setting the autoCommit property of the

r
Transaction to false

i to
C : By calling the method beginTransaction() on the Connection object

D : By setting the autoCommit property of the Connection to false, and execute a statement in the
database

Ed
Q.no 33. Which of the following statements are correct about the status of the Http response.

A : A status of 200 to 299 signifies that the request was successful

B : A status of 300 to 399 are informational messages

DF
C : A status of 400 to 499 indicates an error in the server

D : A status of 500 to 599 indicates an error in the client

Q.no 34. What is Servlet Hierachy :i) GenericServlet ii)HttpServlet iii) Servlet iv) MyServlet

rP
A : I,ii,iii,iv

B : iii,ii,iv,i
te
C : iii,I,ii,iv

D : ii,I,iv,iii
as

Q.no 35. Which driver uses ODBC driver to connect to the database?

A : JDBC-ODBC bridge driver


M

B : Native - API driver

C : Network Protocol driver


in

D : Thin driver

Q.no 36. Web server is used for loading the init() method of servlet.
ed

A : TRUE

B : False
at

C:

D:
re

Q.no 37. How many steps are used to connect any java application using JDBC?

A:5

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 80/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B:4

r
C:3

i to
D:6

Q.no 38. Which of the following code retrieves the MIME type of the body of the request?

Ed
A : new MimeType()

B : request.getContentType()

C : response.getContentType()

DF
D : getContent()

Q.no 39. What is the relation between hashset and hashmap?

rP
A : HashSet internally implements HashMap

B : HashMap internally implements HashSet

C : HashMap is the interface; HashSet is the concrete class


te
D : HashSet is the interface; HashMap is the concrete class

Q.no 40. The method forward(request, response) will


as

A : return back to the same method from where the forward was invoked

B : not return back to the same method from where the forward was invoked and the web pages
M

navigation continues

C : Both 1 and 2 are correct

D : None
in

Q.no 41. Which of the following is true about info Attribute?

A : The info attribute lets you provide a description of the JSP


ed

B : The info attribute is used by JSP container for optimization of generated servlet code.

C : Both of the above.


at

D : None

Q.no 42. Which is faster and uses less memory?


re

A : ListEnumeration

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 81/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : Iterator

r
C : Enumeartion

i to
D : ListIterator

Q.no 43. Which attribute specifies a JSP page that should process any exceptions thrown but not

Ed
caught in the current page?

A : The ErrorPage Attribute

B : The IsErrorPage Attribute

DF
C : Both 1 & 2

D : PageAttribute

Q.no 44. Which of the following attributes are mandatory in <jsp:getProperty /> tag?

rP
A : name, property

B : type, id

C : name, type
te
D : id, property
as
Q.no 45. If your Java application is accessing multiple types of databases at the same time, which
type of driver is the preferred driver.

A : Type-1
M

B : Type-2

C : Type-3
in

D : Type-4

Q.no 46. Which method is used to find the number of column in ResultSet?
ed

A : getNumberOfColumn()

B : getMaxColumn()
at

C : getColumnCount()

D : getColumns()
re

Q.no 47. What is the output of the prg. q33.jpg

A : abcdef

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 82/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : defabc

r
C : abcabc

i to
D : defdef

Q.no 48. By default cursor is pointing to

Ed
A : Column Header

B : First Record

C : Last Record

DF
D : Middle Record

Q.no 49. Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web
server and the DBMS are running on the same machine?

rP
A : Type 1 only

B : Type 2 only

C : Both Type 3 and Type 4


te
D : All the above
as
Q.no 50. Which JDBC driver Type(s) can be used in either applet or servlet code?

A : Both Type 1 and Type 2


M

B : Both Type 1 and Type 3

C : Both Type 3 and Type 4

D : Type 4 only
in

Q.no 51. The default capacity of a ArrayList is:

A : 12
ed

B : 16

C:1
at

D : 10

Q.no 52. Which method in session tracking is used in a bit of information that is sent by a web
re

server to a browser and which can later be read back from that browser?

A : HttpSession

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 83/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : URL rewriting

r
C : Cookies

i to
D : Hidden form fields

Q.no 53. Which of the following is true about Initialization phase in JSP life cycle?

Ed
A : When a container loads a JSP it invokes the jspInit() method before servicing any requests

B : Container invokes _jspService() method during Initialization phase.

C : Both of the above.

DF
D : Container invokes _jspDestroy() method during Initialization phase.

Q.no 54. which tag can hold any Java language expression that can be used as an argument
to out.println() method.

rP
A : Expression tag

B : Declaration Tag/label>

C : Directive Tag
te
D : Scriplet Tag
as
Q.no 55. In HTTP Request what asks for the loopback of the request message, for testing or for
troubleshooting?

A : PUT
M

B : OPTIONS

C : DELETE
in

D : TRACE

Q.no 56. Which are the examples of Application Server?


ed

A : Tomcat

B : Weblogic
at

C : JBoss

D : Both 2 and 3
re

Q.no 57. How do you know in your Java program that a SQL warning is generated as a result of
executing a SQL statement in the database?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 84/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : You must catch the checked SQLException which is thrown by the method which executes the

r
statement

i to
B : You must catch the unchecked SQLWarningException which is thrown by the method which
executes the statement

C : You must invoke the getWarnings() method on the Statement object (or a sub interface thereof)

Ed
D : You must query the ResultSet object about possible warnings generated by the database

Q.no 58. Which HTTP Request method is non-idempotent?

A : GET

DF
B : POST

C : Both 1 & 2

D : ENV

rP
Q.no 59. Which of the following is true about Cleanup phase in JSP life cycle?

A : The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a
container.
te
B : The jspDestroy() method is the JSP equivalent of the destroy method for servlets.
as
C : Both of the above

D : None
M

Q.no 60. What the Class.forName() does?

A : Established the connection with database

B : Load the specified driver class


in

C : Register a driver

D : none of these
ed

Q.no 1. Which of the following method can be used to create a connection object?

A : getConnection(String url,String user,String pass)


at

B : getConnection(String url)

C : getConnection(String url,Properties Prop)


re

D : All mentioned used

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 85/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 2. Which of the following describes the correct sequence of the steps involved in making a

r
connection with a database. 1. Loading the driver
2. Process the resul

i to
A : 1,3,4,2

B : 1,2,3,4

Ed
C : 2,1,3,4

D : 4,1,2,3

Q.no 3. Which of the below is not a session tracking method?

DF
A : URL rewriting

B : History

C : Cookies

rP
D : SSL sessions

Q.no 4. Which type of Statement can execute parameterized queries?


te
A : PreparedStatement

B : ParameterizedStatement
as

C : ParameterizedStatement and CallableStatement

D : Executable Statement
M

Q.no 5. What is multithreaded programming?

A : It’s a process in which two different processes run simultaneously


in

B : It’s a process in which two or more parts of same process run simultaneously

C : It’s a process in which many different process are able to access same information
ed

D : It’s a process in which a single process can access information from many sources

Q.no 6. Which class can handle any type of request so that it is protocol-independent?
at

A : GenericServlet

B : HttpServlet
re

C : Both A & B

D : Servlet

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 86/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 7. How can you retrieve information from a ResultSet?

r
A : By invoking the method get(…, String type) on the ResultSet, where type is the database type

i to
B : By invoking the method get(…, Type type) on the ResultSet, where Type is an object which
represents a database type

Ed
C : By invoking the method getValue(…), and cast the result to the desired Java type

D : By invoking the special getter methods on the ResultSet: getString(…), getBoolean (…),
getClob(…),…

Q.no 8. What is JDBC?

DF
A : java compiler

B : Java API

C : Java interpreter

rP
D : Both A and B

Q.no 9. pageContext is an implicit object in jsp.


te
A : TRUE

B : FALSE
as

C:

D:
M

Q.no 10. What is a Expression in JSP?

A : <%= %>
in

B : <% %>

C : <* *>
ed

D : <? ?>

Q.no 11. Preparedstatement Object in JDBC is used to execute which of the following query
at

A : executable

B : simple
re

C : high level

D : parameterized

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 87/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 12. JDBC is a which type of inerface which means that it is used to invoke SQL commands

r
directly

i to
A : low-level

B : middle-level

Ed
C : higher-level

D : user

Q.no 13. Which of the following method can be used to get the multiple values of a parameter like
checkbox data?

DF
A : request.getParameter()

B : request.getParameterValues()

C : request.getParameterNames()

rP
D : request.getFunctionNames()

Q.no 14. What is the maximum size of cookie?


te
A : 4 KB

B : 4 MB
as

C : 4 bytes

D : 40 KB
M

Q.no 15. Which method is used to check if a thread is running?

A : isAlive()
in

B : run ()

C : alive ()
ed

D : keepAlive()

Q.no 16. PageContext is instance of which class?


at

A : javax.servlet.ServletContext

B : javax.servlet.ServletConfig
re

C : javax.servlet.jsp.PageContext

D : javax.servlet.Application

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 88/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 17. State true or false . Does the JDBC-ODBC Bridge support multiple concurrent open

r
statements per connection?

i to
A : TRUE

B : FALSE

Ed
C:

D:

Q.no 18. Which method is used to perform DML statements in JDBC?

DF
A : Execute

B : executeQuery()

C : executeUpdate()

rP
D : executeResult()

Q.no 19. What is maximum thread priority in Java

A : 10
te
B : 12
as
C:5

D:8
M

Q.no 20. Which statements is/are correct

A : On calling Thread start () method a new thread get created

B : Thread start () method call run () method internally


in

C : Thread run () method can also be called directly to create thread.

D : Both 1 and 2
ed

Q.no 21. What is synchronization in reference to a thread?

A : It’s a process of handling situations when two or more threads need access to a shared resource
at

B : It’s a process by which many thread are able to access same shared resource simultaneously

C : It’s a process by which a method is able to access many different threads simultaneously
re

D : It’s a method that allow too many threads to access any information that require

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 89/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 22. Drivers that are JDBC Compliant should normally support scrollable result sets, but

r
they are not required to do so

i to
A : TRUE

B : FALSE

Ed
C:

D:

Q.no 23. ResultSet object can be moved forward only and it is updatable.

DF
A : TRUE

B : FALSE

C:

rP
D:

Q.no 24. If a priority of a java thread is 3 then the default priority of its child thread will be

A:0
te
B:1
as
C:5

D:3
M

Q.no 25. Which of the scripting of JSP not putting content into service method of the converted
servlet?

A : Declarations
in

B : Scriptlets

C : Expressions
ed

D : Include

Q.no 26. Which of the following is not a valid attribute of a page directives?
at

A : language

B : extend
re

C : export

D : import

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 90/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 27. JSP page perform request processing by calling which method?

r
A : jsp_Service

i to
B : service

C : jspService

Ed
D : _jspService

Q.no 28. What is the Output of following Java Program? q25.jpg

A : 11 10 22 5 12 2

DF
B : 2 12 5 22 10 11

C : 2 5 10 11 12 22

rP
D : 22 12 11 10 5 2

Q.no 29. Which result set generally does not show changes to the underlying database that are
made while it is open. The membership, order, and column values of rows are typically fixed
when the result set is created?
te
A : TYPE_FORWARD_ONLY

B : TYPE_SCROLL_INSENSITIVE
as

C : TYPE_SCROLL_SENSITIVE

D : TYPE_SCROLL
M

Q.no 30. Which packages represent interfaces and classes for servlet API?

A : javax.servlet
in

B : javax.servlet.http

C : Both 1 & 2
ed

D : java

Q.no 31. Which of these iterators can be used only with List?
at

A : SetIterator

B : ListIterator
re

C : Literator

D : Comparator

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 91/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 32. What is the reason that a java program cannot directly communicate with an ODBC

r
driver?

i to
A : ODBC written in C# language

B : ODBC written in C language

Ed
C : ODBC written in C++ language

D : ODBC written in COBOL language

Q.no 33. Which method is used to send the same request and response objects to another servlet
in RequestDispatcher ?

DF
A : forward()

B : sendRedirect()

C : Both 1 & 2

rP
D : send()

Q.no 34. Which of these method wakes up the first thread that called wait()?
te
A : wait()

B : notify()
as

C : start()

D : notifyAll()
M

Q.no 35. Which option is true about session scope?

A : Objects are accessible only from the page in which they are created
in

B : Objects are accessible only from the pages which are in same session

C : Objects are accessible only from the pages which are processing the same request
ed

D : Objects are accessible only from the pages which reside in same application

Q.no 36. Which of these method is used to tell the calling thread to give up a monitor and go to
sleep until some other thread enters the same monitor?
at

A : wait()

B : notify()
re

C : notifyAll()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 92/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : sleep()

r
Q.no 37. Which class provides stream to read binary data such as image etc. from the request

i to
object?

A : ServletInputStream

Ed
B : ServletOutputStream

C : Both 1 & 2

D : InputStream

DF
Q.no 38. Which method is used to make main thread to wait for all child threads

A : Join ()

B : Sleep ()

rP
C : Wait ()

D : Stop ()

Q.no 39. Which method must be implemented by a Java thread?


te
A: run()
as
B : execute()

C : start()
M

D : paint()

Q.no 40. Which of these standard collection classes implements a dynamic array?

A : AbstractList
in

B : LinkedList

C : ArrayList
ed

D : AbstractSet

Q.no 41. Which JDBC driver Types are for use over communications networks?
at

A : Type 3 only

B : Type 4 only
re

C : Both Type 3 and Type 4

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 93/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Neither Type 3 nor Type 4

r
Q.no 42. Which allows the storage of a null key and many null values?

i to
A : Hashtable

B : HashMap

Ed
C : Both

D : Tree

Q.no 43. Deque and Queue are derived from:

DF
A : AbstractList

B : Collection

rP
C : AbstractCollection

D : List

Q.no 44. Which directive tells the Web Container to copy everything in the included file and
paste it into current JSP file?
te
A : taglib
as
B : Page

C : include
M

D : exclude

Q.no 45. What is the Output of following Java Program? q34.jpg

A : 12885
in

B : 12845

C : 58881
ed

D : 54881

Q.no 46. Which of the following is true about info Attribute?


at

A : The info attribute lets you provide a description of the JSP

B : The info attribute is used by JSP container for optimization of generated servlet code.
re

C : Both of the above.

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 94/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : None

r
Q.no 47. Which of the following is true about autoFlush Attribute?

i to
A : The autoFlush attribute can specify that buffered output should be flushed automatically when the
buffer is filled.

Ed
B : The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.

C : Both of the above

D : None

DF
Q.no 48. RowSet is belong to which package?

A : java.sql

B : javax.sql

rP
C : java.jdbc

D : javax.jdbc

Q.no 49. Where the stored procedures reside?


te
A : In side server memory
as
B : In side cache

C : Inside database
M

D : In side browser

Q.no 50. Which one of the following scopes does the attribute in servlet is an object that can be
set, get or removed?
in

A : session scope

B : request scope
ed

C : application scope

D : Mentioned all of above


at

Q.no 51. What implementation of Iterator can traverse a collection in both directions?

A : Iterator
re

B : ListIterator

C : SetInterator

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 95/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : MapInterator

r
Q.no 52. Which class can handle any type of request so that it is protocol-independent?

i to
A : GenericServlet

B : HttpServlet

Ed
C : Both 1 & 2

D : ContextServlet

Q.no 53. Which implicit object of JSP is equivalent to this variable of Java programming

DF
language?

A : page

B : pageContext

rP
C : config

D : application

Q.no 54. JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you
te
can do with Java servlets.

A : TRUE
as

B : FALSE

C:
M

D:

Q.no 55. Which can generate HTML dynamically on the client but can hardly interact with the
web server to perform complex tasks like database access and image processing etc. in JSP?
in

A : vs.Static HTML

B : vs.Server-Side Includes
ed

C: vs.Pure Servlets

D : Vs.JavaScript
at

Q.no 56. Servlet technology is used to create web application

A : TRUE
re

B : FALSE

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 96/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C:

r
D:

i to
Q.no 57. We can get the Database details using?

A : DatabaseDetails

Ed
B : DatabaseServerData

C : DatabaseRawData

D : DatabaseMetaData

DF
Q.no 58. Which of the following tag is used to declare error pages in the Deployment Descriptor
for the entire Web Apllication?

A : <error>

rP
B : <page>

C : <errorPage>

D : <error-page>
te
Q.no 59. Type-2 driver called as
as
A : Native-protocol, pure Java driver

B : JDBC-Net, pure Java driver


M

C : Native-API, partly Java driver

D : JDBC-ODBC Bridge plus ODBC driver

Q.no 60. which tag can hold any Java language expression that can be used as an argument
in

to out.println() method.

A : Expression tag
ed

B : Declaration Tag/label>

C : Directive Tag
at

D : Scriplet Tag

Q.no 1. Default value of a java thread is


re

A:0

B:1

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 97/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C:5

r
D : 10

i to
Q.no 2. Which of the following is stored at client side?

A : URL rewriting

Ed
B : Hidden form fields

C : SSL sessions

D : Cookies

DF
Q.no 3. The hasNext method returns true if the iteration has more elements.

A : True

rP
B : False

C:

D:
te
Q.no 4. Which of these methods sets every element of a List to a specified object?

A : set()
as

B : fill()

C : Complete()
M

D : add()

Q.no 5. Choose an incorrect statement from the following.


in

A : . JSP pages are easier to maintain than a servlet.

B : The Web Container translate a Servlet into JSP page


ed

C : JSP is built on Java Technology so it is platform independent

D : A JSP page seperates presentation and business logic.


at

Q.no 6. Execution of a java thread begins on which method call?

A : Start ()
re

B: Run ()

C : Execute ()
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 98/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D: Launch ()

r
Q.no 7. Which type of driver provides JDBC access via one or more ODBC drivers?

i to
A : Type 1 driver

B : Type 2 driver

Ed
C : Type 3 driver

D: Type 4 driver

Q.no 8. Which method is applied to the database only when Auto Commit is set to false.

DF
A : Commit

B : close

rP
C : open

D : terminate.

Q.no 9. Which of the following is a server side technology?


te
A : html

B : jsp
as

C : javascript

D : css
M

Q.no 10. Which object stores references to the request and response objects?

A : sessionContext
in

B : pageContext

C : HttpSession
ed

D : sessionAttribute

Q.no 11. Which of the following is true about servlets?


at

A : Servlets execute within the address space of web server

B : Servlets are platform-independent because they are written in java


re

C : Servlets can use the full functionality of the Java class libraries

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 99/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Servlets execute within the address space of web server, platform independent and uses the

r
functionality of java class libraries

i to
Q.no 12. Which method is used to move to next element in a collection?

A : next()

Ed
B : move()

C : shuffle()

D : hasNext()

DF
Q.no 13. Which of the following is a correct constructor for thread?

A : Thread(Runnable a, String str)

B : Thread(int priority)

rP
C : Thread(Runnable a, int priority)

D : Thread(Runnable a, ThreadGroup t)

Q.no 14. Which of the following methods are needed for loading a database driver in JDBC?
te
A : registerDriver()
as
B : Class.forName()

C : Both 1 and 2
M

D : Register()

Q.no 15. Which of this method is used to avoid polling in Java?

A : wait()
in

B : notify()

C : notifyAll()
ed

D : mentioned all of above

Q.no 16. Which of these statements is incorrect?


at

A : By multithreading CPU idle time is minimized, and we can take maximum use of it

B : By multitasking CPU idle time is minimized, and we can take maximum use of it
re

C : Two thread in Java can have the same priority

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 100/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : A thread can exist only in two states, running and blocked

r
Q.no 17. Which tag is used to execute java source code in JSP?

i to
A : Declaration Tag

B : Scriptlet tag

Ed
C : Expression tag

D : html tag

Q.no 18. Which of the following will ensure the thread will be in running state?

DF
A : yield()

B : notify()

rP
C : wait()

D : Thread.killThread()

Q.no 19. The database system compiles query when it is


te
A : Executed

B : Initiated
as

C : Prepared

D : Invoked
M

Q.no 20. What is Collection in Java?

A : A group of objects
in

B : A group of classes

C : A group of interfaces
ed

D : group of functions

Q.no 21. Which are the session tracking techniques? i. URL rewriting
ii. Using HTTPSession Class
at

iii.Using response object


iv. Using hidden form fields
v. Using cookies
vi. Using servlet object
re

A : i, ii, iii, vi

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 101/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : i, ii, iv, v

r
C : i, vi, iii, v

i to
D : i, ii, iii, v

Q.no 22. Suppose that you would like to create an instance of a new Map that has an iteration

Ed
order that is the same as the iteration order of an existing instance of a Map. Which concrete
implementation of the Map interface should be used for the new instance?

A : TreeMap

B : HashMap

DF
C : LinkedHashMap

D : The answer depends on the implementation of the existing instance.

Q.no 23. Using mail API we cannot send mail from a servlet.

rP
A : TRUE

B : False
te
C:

D:
as

Q.no 24. Web server is used for loading the init() method of servlet.

A : TRUE
M

B : False

C:
in

D:

Q.no 25. Which type of ServletEngine is a server that includes built-in support for servlets?
ed

A : Add-on ServletEngine

B : Embedded ServletEngine
at

C : Standalone ServletEngine

D : Dowloaded ServletEngine
re

Q.no 26. Which implicit object of JSP is associated with the Output Stream of response object?

A : write

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 102/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : out

r
C : response

i to
D : responseWriter

Q.no 27. What happens if you call the method close() on a ResultSet object?

Ed
A : the method close() does not exist for a ResultSet. Only Connections can be closed.

B : the database and JDBC resources are released

C : you will get a SQLException, because only Statement objects can close ResultSets

DF
D : The ResultSet, together with the Statement which created it and the Connection from which the
Statement was retrieved, will be closed and release all database and JDBC resources

Q.no 28. Which attribute uniquely identification element?

rP
A : ID

B : Class

C : Name
te
D : Scope
as
Q.no 29. Which class has traditionally been the backbone of the JDBC architecture?

A : the JDBC driver manager


M

B : The JDBC driver test suite

C : The JDBC-ODBC bridge

D : Java API Bridge


in

Q.no 30. Which method is used for an SQL statement that is executed frequently?

A : prepareStatement
ed

B : prepareCall

C : createStatement
at

D : simpleStatement

Q.no 31. Which interface is used to access information about the database.
re

A : Database

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 103/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : DatabaseMetaData

r
C : Result Set

i to
D : GetData

Q.no 32. What is the Output of following Java Program? q23.jpg

Ed
A : java.util.LinkedList

B : String

C : Compiler Error

DF
D : Syntax Error

Q.no 33. Which of the following statements are correct about the status of the Http response.

rP
A : A status of 200 to 299 signifies that the request was successful

B : A status of 300 to 399 are informational messages

C : A status of 400 to 499 indicates an error in the server


te
D : A status of 500 to 599 indicates an error in the client

Q.no 34. What programming language(s) or scripting language(s) does Java Server Pages (JSP)
as
support?

A : VBScript only
M

B : Jscript only

C : Java only

D : Text only
in

Q.no 35. Which is not a directive?

A : include
ed

B : page

C : export
at

D : useBean

Q.no 36. Which of these interface declares core method that all collections will have?
re

A : set

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 104/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : EventListner

r
C : Comparator

i to
D : Collection

Q.no 37. A JSP page consists of which tags?

Ed
A : HTML tags

B : JSP tags

C : Both 1 & 2

DF
D : Notag

Q.no 38. The method forward(request, response) will

rP
A : return back to the same method from where the forward was invoked

B : not return back to the same method from where the forward was invoked and the web pages
navigation continues

C : Both 1 and 2 are correct


te
D : None
as
Q.no 39. The ResultSet.next method is used to move to the next row of the ResultSet, making it
the current row.

A : TRUE
M

B : FALSE

C:
in

D:

Q.no 40. Sessions is a part of the SessionTracking and it is for maintaining the client state at
server side.
ed

A : TRUE

B : False
at

C:

D:
re

Q.no 41. Which method in session tracking is used in a bit of information that is sent by a web
server to a browser and which can later be read back from that browser?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 105/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : HttpSession

r
B : URL rewriting

i to
C : Cookies

D : Hidden form fields

Ed
Q.no 42. Which directive tells the Web Container to copy everything in the included file and
paste it into current JSP file?

A : taglib

DF
B : Page

C : include

D : exclude

rP
Q.no 43. Which JDBC driver Type(s) can be used in either applet or servlet code?

A : Both Type 1 and Type 2

B : Both Type 1 and Type 3


te
C : Both Type 3 and Type 4
as
D : Type 4 only

Q.no 44. Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web
server and the DBMS are running on the same machine?
M

A : Type 1 only

B : Type 2 only
in

C : Both Type 3 and Type 4

D : All the above


ed

Q.no 45. Deque and Queue are derived from:

A : AbstractList
at

B : Collection

C : AbstractCollection
re

D : List

Q.no 46. Which JDBC driver Types are for use over communications networks?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 106/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : Type 3 only

r
B : Type 4 only

i to
C : Both Type 3 and Type 4

D : Neither Type 3 nor Type 4

Ed
Q.no 47. How do you know in your Java program that a SQL warning is generated as a result of
executing a SQL statement in the database?

A : You must catch the checked SQLException which is thrown by the method which executes the
statement

DF
B : You must catch the unchecked SQLWarningException which is thrown by the method which
executes the statement

C : You must invoke the getWarnings() method on the Statement object (or a sub interface thereof)

rP
D : You must query the ResultSet object about possible warnings generated by the database

Q.no 48. Which attribute specifies a JSP page that should process any exceptions thrown but not
caught in the current page?
te
A : The ErrorPage Attribute

B : The IsErrorPage Attribute


as

C : Both 1 & 2

D : PageAttribute
M

Q.no 49. Which is faster and uses less memory?

A : ListEnumeration
in

B : Iterator

C : Enumeartion
ed

D : ListIterator

Q.no 50. Which method is used to find the number of column in ResultSet?

A : getNumberOfColumn()
at

B : getMaxColumn()
re

C : getColumnCount()

D : getColumns()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 107/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 51. Which of the following attributes are mandatory in <jsp:getProperty /> tag?

r
A : name, property

i to
B : type, id

C : name, type

Ed
D : id, property

Q.no 52. In HTTP Request what asks for the loopback of the request message, for testing or for
troubleshooting?

DF
A : PUT

B : OPTIONS

C : DELETE

rP
D : TRACE

Q.no 53. Which of the following is true about Initialization phase in JSP life cycle?

A : When a container loads a JSP it invokes the jspInit() method before servicing any requests
te
B : Container invokes _jspService() method during Initialization phase.
as
C : Both of the above.

D : Container invokes _jspDestroy() method during Initialization phase.


M

Q.no 54. Which HTTP Request method is non-idempotent?

A : GET

B : POST
in

C : Both 1 & 2

D : ENV
ed

Q.no 55. If your Java application is accessing multiple types of databases at the same time, which
type of driver is the preferred driver.
at

A : Type-1

B : Type-2
re

C : Type-3

D : Type-4

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 108/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 56. Which of the following is true about Cleanup phase in JSP life cycle?

r
A : The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a

i to
container.

B : The jspDestroy() method is the JSP equivalent of the destroy method for servlets.

Ed
C : Both of the above

D : None

Q.no 57. Which allows the storage of a null key and many null values?

DF
A : Hashtable

B : HashMap

C : Both

rP
D : Tree

Q.no 58. What is the output of the prg. q33.jpg

A : abcdef
te
B : defabc
as
C : abcabc

D : defdef
M

Q.no 59. The default capacity of a ArrayList is:

A : 12

B : 16
in

C:1

D : 10
ed

Q.no 60. Which are the examples of Application Server?

A : Tomcat
at

B : Weblogic

C : JBoss
re

D : Both 2 and 3

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 109/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 1. When doGet() method of servlet gets called?

r
A : GET request results from a normal request for a URL.

i to
B : The service() method checks the HTTP request type as GET and calls doGet() method.

C : Both of above

Ed
D : When Invoked then

Q.no 2. What is maximum thread priority in Java

A : 10

DF
B : 12

C:5

rP
D:8

Q.no 3. Which of the following stops execution of a thread?

A : Calling SetPriority() method on a Thread object


te
B : Calling notify() method on an object

C : Calling wait() method on an object


as

D : Calling read() method on an InputStream object

Q.no 4. Which JSP life cycle is in the correct order?


M

A : Translation → Initializing → Request Processing → Destroying

B : Translation → Request Processing → Initializing → Destroying


in

C:

D:
ed

Q.no 5. The Interface ResultSet has a method getMataData() that returns

A : Tuple
at

B : Value

C : Object
re

D : Result

Q.no 6. It is a collection that cannot contain duplicate element


https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 110/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : List

r
B : Queue

i to
C : Set

D : Collection

Ed
Q.no 7. What requires less resources?

A : Thread

B : Process

DF
C : Thread and Process

D : Neither Thread nor Process

rP
Q.no 8. Choose the statement that best describes the relationship between JSP and servlets:

A : Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime usage.

B : JSP and servlets are unrelated technologies.


te
C : Servlets and JSP are competing technologies for handling web requests. Servlets are being
superseded by JSP, which is preferred. The two technologies are not useful in combination.
as
D : JSPs are built on servlet semantics and all JSPs are compiled to servlets for runtime usage.

Q.no 9. In JSP how many ways are there to perform exception handling?
M

A:3

B:2

C:4
in

D:5

Q.no 10. Which tag should be used to pass information from JSP to included JSP?
ed

A : Using <%jsp:page> tag

B : Using <%jsp:param> tag


at

C : Using <%jsp:import> tag

D : Using <%jsp:useBean> tag


re

Q.no 11. What are scripting languages?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 111/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : The programming languages that pre decide the web page content

r
B : The programming languages that are simpler and offer same protection

i to
C : The programming languages that trade off simplicity for protection

D : Complicates application

Ed
Q.no 12. Which method of stack returns the element on the top of the stack by not removing it

A : search()

B : pop()

DF
C : peek()

D : push()

rP
Q.no 13. What is multithreaded programming?

A : It’s a process in which two different processes run simultaneously

B : It’s a process in which two or more parts of same process run simultaneously
te
C : It’s a process in which many different process are able to access same information

D : It’s a process in which a single process can access information from many sources
as

Q.no 14. JDBC is a which type of inerface which means that it is used to invoke SQL commands
directly
M

A : low-level

B : middle-level

C : higher-level
in

D : user

Q.no 15. Servlets handle multiple simultaneous requests by using threads.


ed

A : TRUE

B : FALSE
at

C:

D:
re

Q.no 16. State true or false . Does the JDBC-ODBC Bridge support multiple concurrent open
statements per connection?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 112/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : TRUE

r
B : FALSE

i to
C:

D:

Ed
Q.no 17. Which of the following code is used to get an attribute in a HTTP Session object in
servlets?

A : session.getAttribute(String name)

DF
B : session.alterAttribute(String name)

C : session.updateAttribute(String name)

D : session.setAttribute(String name)

rP
Q.no 18. Which method is used to delete all elements from collection

A : clear()

B : reset()
te
C : delete()
as
D : refresh()

Q.no 19. Which JSP Action tags is used to include the content of another resource, it may be jsp,
html or servlet?
M

A : jsp:include

B : jsp:forward
in

C : jsp:plugin

D : jsp:param
ed

Q.no 20. ODBC is not appropriate for direct use from java because it uses a

A : C interface
at

B : C# interface

C : java interface
re

D : Both A and C

Q.no 21. How many steps are used to connect any java application using JDBC?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 113/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A:5

r
B:4

i to
C:3

D:6

Ed
Q.no 22. Which JDBC product components does the Java software provide?

A : The JDBC driver manager

B : The JDBC driver test suite

DF
C : The JDBC-ODBC bridge

D : Provide all mentioned

rP
Q.no 23. Which method used to return the last time the client sent request associated with
session.

A : getCreationTime()

B : getLastAccessedTime()
te
C : getMaxInterval()
as
D : getReturnTime()

Q.no 24. Which class provides stream to read binary data such as image etc. from the request
object?
M

A : ServletInputStream

B : ServletOutputStream
in

C : Both 1 & 2

D : InputStream
ed

Q.no 25. Which statement is true for the class java.util.HashSet?

A : The elements in the collection are ordered.


at

B : The collection is guaranteed to be immutable.

C : The elements in the collection are guaranteed to be unique.


re

D : The elements in the collection are accessed using a unique key

Q.no 26. What happens if you call deleteRow() on a ResultSet object?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 114/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : The row you are positioned on is deleted from the ResultSet, but not from the database.

r
B : The row you are positioned on is deleted from the ResultSet and from the database

i to
C : The result depends on whether the property synchronizeWithDataSource is set to true or false

D : You will get a compile error: the method does not exist because you can not delete rows from a

Ed
ResultSet

Q.no 27. The Mechanism used by the web container to store session information for a particular
user is

A : Request Management

DF
B : Container Management

C : Response Management

D : Session Management

rP
Q.no 28. Which method is used to make main thread to wait for all child threads

A : Join ()
te
B : Sleep ()

C : Wait ()
as

D : Stop ()

Q.no 29. Which method is used to execute a SQL select statement and returns a results?
M

A : Execute( )

B : cancel ( )
in

C : executeQuery()

D : Open ( )
ed

Q.no 30. Which of these is an incorrect form of using method max() to obtain maximum element?

A : max(Collection c)
at

B : max(Collection c, Comparator comp)

C : max(Comparator comp)
re

D : max(List c)

Q.no 31. Protocol used for handling Get and Post requests are

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 115/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : SMTP

r
B : FTP

i to
C : HTTP

D : POP3

Ed
Q.no 32. In the following JDBC drivers which is known as fully java driver?

A : Native-API driver

B : Network Protocol driver

DF
C : Thin driver

D : Both 2& 3

rP
Q.no 33. Which method we implement from Runnable interface?

A : Run ()

B : Start ()
te
C : Execute ()

D : call ()
as

Q.no 34. If a priority of a java thread is 3 then the default priority of its child thread will be

A:0
M

B:1

C:5
in

D:3

Q.no 35. JDBC is a Java API that is used to connect and execute query to the database
ed

A : TRUE

B : FALSE
at

C:

D:
re

Q.no 36. What is used to execute parameterized query?

A : Statement interface
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 116/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : PreparedStatement interface

r
C : ResultSet interface

i to
D : None of the above

Q.no 37. Which of the below does not implement Map interface?

Ed
A : HashMap

B : Hashtable

C : EnumMap

DF
D : Vector

Q.no 38. “out” is implicit object of which class?

rP
A : javax.servlet.jsp.PrintWriter

B : javax.servlet.jsp.SessionWriter

C : javax.servlet.jsp.SessionPrinter
te
D : javax.servlet.jsp.JspWriter

Q.no 39. Java code is embedded under which tag in JSP?


as

A : Declaration

B : Scriptlet
M

C : Expression

D : Comment
in

Q.no 40. How can you start a database transaction in the database?

A : By asking a Transaction object to your Connection, and calling the method begin() on it
ed

B : By asking a Transaction object to your Connection, and setting the autoCommit property of the
Transaction to false

C : By calling the method beginTransaction() on the Connection object


at

D : By setting the autoCommit property of the Connection to false, and execute a statement in the
database
re

Q.no 41. We can get the Database details using?

A : DatabaseDetails

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 117/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : DatabaseServerData

r
C : DatabaseRawData

i to
D : DatabaseMetaData

Q.no 42. What the Class.forName() does?

Ed
A : Established the connection with database

B : Load the specified driver class

C : Register a driver

DF
D : none of these

Q.no 43. By default cursor is pointing to

rP
A : Column Header

B : First Record

C : Last Record
te
D : Middle Record

Q.no 44. Which of the following is true about autoFlush Attribute?


as

A : The autoFlush attribute can specify that buffered output should be flushed automatically when the
buffer is filled.
M

B : The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.

C : Both of the above

D : None
in

Q.no 45. Which of the following tag is used to declare error pages in the Deployment Descriptor
for the entire Web Apllication?
ed

A : <error>

B : <page>
at

C : <errorPage>

D : <error-page>
re

Q.no 46. Where the stored procedures reside?

A : In side server memory

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 118/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : In side cache

r
C : Inside database

i to
D : In side browser

Q.no 47. Which can generate HTML dynamically on the client but can hardly interact with the

Ed
web server to perform complex tasks like database access and image processing etc. in JSP?

A : vs.Static HTML

B : vs.Server-Side Includes

DF
C: vs.Pure Servlets

D : Vs.JavaScript

Q.no 48. Which class can handle any type of request so that it is protocol-independent?

rP
A : GenericServlet

B : HttpServlet

C : Both 1 & 2
te
D : ContextServlet
as
Q.no 49. JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you
can do with Java servlets.

A : TRUE
M

B : FALSE

C:
in

D:

Q.no 50. which tag can hold any Java language expression that can be used as an argument
to out.println() method.
ed

A : Expression tag

B : Declaration Tag/label>
at

C : Directive Tag

D : Scriplet Tag
re

Q.no 51. Which implicit object of JSP is equivalent to this variable of Java programming
language?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 119/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : page

r
B : pageContext

i to
C : config

D : application

Ed
Q.no 52. Type-2 driver called as

A : Native-protocol, pure Java driver

B : JDBC-Net, pure Java driver

DF
C : Native-API, partly Java driver

D : JDBC-ODBC Bridge plus ODBC driver

rP
Q.no 53. What is the Output of following Java Program? q34.jpg

A : 12885

B : 12845
te
C : 58881

D : 54881
as

Q.no 54. Which JDBC driver Type(s) can be used in either applet or servlet code?

A : Both Type 1 and Type 2


M

B : Both Type 1 and Type 3

C : Both Type 3 and Type 4


in

D : Type 4 only

Q.no 55. Which of the following is true about info Attribute?


ed

A : The info attribute lets you provide a description of the JSP

B : The info attribute is used by JSP container for optimization of generated servlet code.
at

C : Both of the above.

D : None
re

Q.no 56. Deque and Queue are derived from:

A : AbstractList
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 120/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : Collection

r
C : AbstractCollection

i to
D : List

Q.no 57. Which are the examples of Application Server?

Ed
A : Tomcat

B : Weblogic

C : JBoss

DF
D : Both 2 and 3

Q.no 58. Which method in session tracking is used in a bit of information that is sent by a web
server to a browser and which can later be read back from that browser?

rP
A : HttpSession

B : URL rewriting

C : Cookies
te
D : Hidden form fields
as
Q.no 59. Which JDBC driver Types are for use over communications networks?

A : Type 3 only
M

B : Type 4 only

C : Both Type 3 and Type 4

D : Neither Type 3 nor Type 4


in

Q.no 60. Which of the following attributes are mandatory in <jsp:getProperty /> tag?

A : name, property
ed

B : type, id

C : name, type
at

D : id, property

Q.no 1. The life cycle of servlet is managed by


re

A : servlet container

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 121/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : servlet context

r
C : both a and b

i to
D : None of above

Q.no 2. Which of these are types of multitasking?

Ed
A : Process based

B : Thread based

C : Process and Thread based

DF
D : Scheduler based

Q.no 3. Which method is applied to the database only when Auto Commit is set to false.

rP
A : Commit

B : close

C : open
te
D : terminate.

Q.no 4. Which of this method is used to avoid polling in Java?


as

A : wait()

B : notify()
M

C : notifyAll()

D : mentioned all of above


in

Q.no 5. What is JDBC?

A : java compiler
ed

B : Java API

C : Java interpreter
at

D : Both A and B

Q.no 6. Which of these classes is not part of Java’s collection framework?


re

A : Maps

B : Array
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 122/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Stack

r
D : Queue

i to
Q.no 7. Which tag is used to execute java source code in JSP?

A : Declaration Tag

Ed
B : Scriptlet tag

C : Expression tag

D : html tag

DF
Q.no 8. What is the meaning of ResultSet.TYPE_SCROLL_INSENSITIVE

A : This means that the ResultSet is insensitive to scrolling

rP
B : This means that the Resultset is sensitive to scrolling, but insensitive to updates, i.e. not updateable

C : This means that the ResultSet is sensitive to scrolling, but insensitive to changes made by others

D : The meaning depends on the type of data source, and the type and version of the driver you use
with this data source
te
Q.no 9. Which method is used to check if a thread is running?
as
A : isAlive()

B : run ()
M

C : alive ()

D : keepAlive()

Q.no 10. Which method of ListIterator is used to obtain index of previous element?
in

A : previous()

B : previousIndex()
ed

C : back()

D : goBack()
at

Q.no 11. In which Interface keys and values are objects.

A : Map
re

B : Set

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 123/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : TreeSet

r
D : HashSet

i to
Q.no 12. Which of these statements is incorrect?

A : By multithreading CPU idle time is minimized, and we can take maximum use of it

Ed
B : By multitasking CPU idle time is minimized, and we can take maximum use of it

C : Two thread in Java can have the same priority

D : A thread can exist only in two states, running and blocked

DF
Q.no 13. What is the maximum size of cookie?

A : 4 KB

rP
B : 4 MB

C : 4 bytes

D : 40 KB
te
Q.no 14. Which of these methods sets every element of a List to a specified object?

A : set()
as

B : fill()

C : Complete()
M

D : add()

Q.no 15. Which class can handle any type of request so that it is protocol-independent?
in

A : GenericServlet

B : HttpServlet
ed

C : Both A & B

D : Servlet
at

Q.no 16. Why will you set auto commit mode to false?

A : To increase the performance


re

B : To maintain the integrity of business process

C : To use distributed transactions


https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 124/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Does all mentioned

r
Q.no 17. Which attribute specifies threding model in page directive in jsp.

i to
A : info

B : threadmod

Ed
C : isThreadSafe

D : language

Q.no 18. Which Interface in java is not allowing null values?

DF
A : HashMap

B : TreeMap

rP
C : LinkedHashMap

D : Set

Q.no 19. Which type of driver provides JDBC access via one or more ODBC drivers?
te
A : Type 1 driver

B : Type 2 driver
as

C : Type 3 driver

D: Type 4 driver
M

Q.no 20. Which object stores references to the request and response objects?

A : sessionContext
in

B : pageContext

C : HttpSession
ed

D : sessionAttribute

Q.no 21. The method forward(request, response) will


at

A : return back to the same method from where the forward was invoked

B : not return back to the same method from where the forward was invoked and the web pages
navigation continues
re

C : Both 1 and 2 are correct

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 125/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : None

r
Q.no 22. The following attribute in Taglib directive is used to distinguish the custom tag from

i to
other library custom tag.

A : Page

Ed
B : Prefix

C : URI

D : URL

DF
Q.no 23. Which object of HttpSession can be used to view and manipulate information about a
session?

A : session identifier

B : creation time

rP
C : last accessed time

D : Mentioned all of above


te
Q.no 24. Which JDBC drivers will run your program?

A : The JDBC-ODBC bridge


as

B : The JDBC driver manager

C : The JDBC driver test suite


M

D : Partly Java Driver

Q.no 25. Which type of ServletEngine is a server that includes built-in support for servlets?
in

A : Add-on ServletEngine

B : Embedded ServletEngine
ed

C : Standalone ServletEngine

D : Dowloaded ServletEngine
at

Q.no 26. RowSet object is non-scrollable and non-updatable by default.

A : TRUE
re

B : FALSE

C:

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 126/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D:

r
Q.no 27. Which of the scripting of JSP not putting content into service method of the converted

i to
servlet?

A : Declarations

Ed
B : Scriptlets

C : Expressions

D : Include

DF
Q.no 28. Which of the following is not a valid attribute of a page directives?

A : language

B : extend

rP
C : export

D : import

Q.no 29. Which option is true about session scope?


te
A : Objects are accessible only from the page in which they are created
as
B : Objects are accessible only from the pages which are in same session

C : Objects are accessible only from the pages which are processing the same request
M

D : Objects are accessible only from the pages which reside in same application

Q.no 30. Which driver uses ODBC driver to connect to the database?

A : JDBC-ODBC bridge driver


in

B : Native - API driver

C : Network Protocol driver


ed

D : Thin driver

Q.no 31. Which attribute uniquely identification element?


at

A : ID

B : Class
re

C : Name

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 127/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Scope

r
Q.no 32. Which of these method is used to tell the calling thread to give up a monitor and go to

i to
sleep until some other thread enters the same monitor?

A : wait()

Ed
B : notify()

C : notifyAll()

D : sleep()

DF
Q.no 33. What is the relation between hashset and hashmap?

A : HashSet internally implements HashMap

B : HashMap internally implements HashSet

rP
C : HashMap is the interface; HashSet is the concrete class

D : HashSet is the interface; HashMap is the concrete class

Q.no 34. State true or false: Executing programs at the client side is slower than executing
te
programs on the server

A : TRUE
as

B : FALSE

C:
M

D:

Q.no 35. The ResultSet.next method is used to move to the next row of the ResultSet, making it
the current row.
in

A : TRUE

B : FALSE
ed

C:

D:
at

Q.no 36. What happens if you call the method close() on a ResultSet object?

A : the method close() does not exist for a ResultSet. Only Connections can be closed.
re

B : the database and JDBC resources are released

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 128/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : you will get a SQLException, because only Statement objects can close ResultSets

r
D : The ResultSet, together with the Statement which created it and the Connection from which the

i to
Statement was retrieved, will be closed and release all database and JDBC resources

Q.no 37. Which class has traditionally been the backbone of the JDBC architecture?

Ed
A : the JDBC driver manager

B : The JDBC driver test suite

C : The JDBC-ODBC bridge

DF
D : Java API Bridge

Q.no 38. Suppose that you would like to create an instance of a new Map that has an iteration
order that is the same as the iteration order of an existing instance of a Map. Which concrete
implementation of the Map interface should be used for the new instance?

rP
A : TreeMap

B : HashMap

C : LinkedHashMap
te
D : The answer depends on the implementation of the existing instance.
as
Q.no 39. Which method must be implemented by a Java thread?

A: run()
M

B : execute()

C : start()

D : paint()
in

Q.no 40. ResultSet object can be moved forward only and it is updatable.

A : TRUE
ed

B : FALSE

C:
at

D:

Q.no 41. Which is faster and uses less memory?


re

A : ListEnumeration

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 129/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : Iterator

r
C : Enumeartion

i to
D : ListIterator

Q.no 42. Which allows the storage of a null key and many null values?

Ed
A : Hashtable

B : HashMap

C : Both

DF
D : Tree

Q.no 43. Servlet technology is used to create web application

rP
A : TRUE

B : FALSE

C:
te
D:

Q.no 44. Which of the following is true about Cleanup phase in JSP life cycle?
as

A : The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a
container.
M

B : The jspDestroy() method is the JSP equivalent of the destroy method for servlets.

C : Both of the above

D : None
in

Q.no 45. Which of the following is true about Initialization phase in JSP life cycle?

A : When a container loads a JSP it invokes the jspInit() method before servicing any requests
ed

B : Container invokes _jspService() method during Initialization phase.

C : Both of the above.


at

D : Container invokes _jspDestroy() method during Initialization phase.

Q.no 46. RowSet is belong to which package?


re

A : java.sql

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 130/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : javax.sql

r
C : java.jdbc

i to
D : javax.jdbc

Q.no 47. What the Class.forName() does?

Ed
A : Established the connection with database

B : Load the specified driver class

C : Register a driver

DF
D : none of these

Q.no 48. If your Java application is accessing multiple types of databases at the same time, which
type of driver is the preferred driver.

rP
A : Type-1

B : Type-2

C : Type-3
te
D : Type-4
as
Q.no 49. Which one of the following scopes does the attribute in servlet is an object that can be
set, get or removed?

A : session scope
M

B : request scope

C : application scope
in

D : Mentioned all of above

Q.no 50. Which attribute specifies a JSP page that should process any exceptions thrown but not
caught in the current page?
ed

A : The ErrorPage Attribute

B : The IsErrorPage Attribute


at

C : Both 1 & 2

D : PageAttribute
re

Q.no 51. Which method is used to find the number of column in ResultSet?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 131/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : getNumberOfColumn()

r
B : getMaxColumn()

i to
C : getColumnCount()

D : getColumns()

Ed
Q.no 52. How do you know in your Java program that a SQL warning is generated as a result of
executing a SQL statement in the database?

A : You must catch the checked SQLException which is thrown by the method which executes the
statement

DF
B : You must catch the unchecked SQLWarningException which is thrown by the method which
executes the statement

C : You must invoke the getWarnings() method on the Statement object (or a sub interface thereof)

rP
D : You must query the ResultSet object about possible warnings generated by the database

Q.no 53. What is the output of the prg. q33.jpg

A : abcdef
te
B : defabc
as
C : abcabc

D : defdef
M

Q.no 54. Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web
server and the DBMS are running on the same machine?

A : Type 1 only
in

B : Type 2 only

C : Both Type 3 and Type 4


ed

D : All the above

Q.no 55. The default capacity of a ArrayList is:

A : 12
at

B : 16
re

C:1

D : 10

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 132/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 56. Which directive tells the Web Container to copy everything in the included file and

r
paste it into current JSP file?

i to
A : taglib

B : Page

Ed
C : include

D : exclude

Q.no 57. We can get the Database details using?

DF
A : DatabaseDetails

B : DatabaseServerData

C : DatabaseRawData

rP
D : DatabaseMetaData

Q.no 58. What implementation of Iterator can traverse a collection in both directions?

A : Iterator
te
B : ListIterator
as
C : SetInterator

D : MapInterator
M

Q.no 59. In HTTP Request what asks for the loopback of the request message, for testing or for
troubleshooting?

A : PUT
in

B : OPTIONS

C : DELETE
ed

D : TRACE

Q.no 60. Which HTTP Request method is non-idempotent?


at

A : GET

B : POST
re

C : Both 1 & 2

D : ENV

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 133/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 1. How can you execute a stored procedure in the database?

r
A : Call method execute() on a CallableStatement object

i to
B : Call method executeProcedure() on a Statement object

C : Call method execute() on a StoredProcedure object

Ed
D : Call method run() on a ProcedureCommand object

Q.no 2. Which action tags are used in JSP for developing web application with Java Bean?

A : jsp:useBean

DF
B : jsp:setProperty

C : jsp:getProperty

rP
D : Both B & C

Q.no 3. Which method is used to move to next element in a collection?

A : next()
te
B : move()

C : shuffle()
as

D : hasNext()

Q.no 4. Which statements about JDBC are true?


M

A : JDBC is an API to connect to relational-, object- and XML data sources

B : JDBC stands for Java DataBase Connectivity


in

C : JDBC is an API to access relational databases, spreadsheets and flat files

D : Both 2 and 3
ed

Q.no 5. What is a Hidden Comment in JSP?

A : <%– –%>
at

B : <%– %>

C : <% !!! %>


re

D : <% &&&%>

Q.no 6. What is Collection in Java?


https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 134/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : A group of objects

r
B : A group of classes

i to
C : A group of interfaces

D : group of functions

Ed
Q.no 7. Which method of stack returns the element on the top of the stack by not removing it

A : search()

B : pop()

DF
C : peek()

D : push()

rP
Q.no 8. Preparedstatement Object in JDBC is used to execute which of the following query

A : executable

B : simple
te
C : high level

D : parameterized
as

Q.no 9. What is a Expression in JSP?

A : <%= %>
M

B : <% %>

C : <* *>
in

D : <? ?>

Q.no 10. Following is an open source DBMS product that runs on UNIX, Linux and Windows
ed

A : MYSQL

B : JSP/SQL
at

C : JDBC/SQL

D : Sun ACCESS
re

Q.no 11. Which of the following method can be used to get the multiple values of a parameter like
checkbox data?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 135/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : request.getParameter()

r
B : request.getParameterValues()

i to
C : request.getParameterNames()

D : request.getFunctionNames()

Ed
Q.no 12. pageContext is an implicit object in jsp.

A : TRUE

B : FALSE

DF
C:

D:

rP
Q.no 13. The database system compiles query when it is

A : Executed

B : Initiated
te
C : Prepared

D : Invoked
as

Q.no 14. Which of the following is a server side technology?

A : html
M

B : jsp

C : javascript
in

D : css

Q.no 15. What is multithreaded programming?


ed

A : It’s a process in which two different processes run simultaneously

B : It’s a process in which two or more parts of same process run simultaneously
at

C : It’s a process in which many different process are able to access same information

D : It’s a process in which a single process can access information from many sources
re

Q.no 16. Servlets handle multiple simultaneous requests by using threads.

A : TRUE
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 136/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : FALSE

r
C:

i to
D:

Q.no 17. Which is the basic Interface that inherits all other Interfaces?

Ed
A : Set

B : Array

C : List

DF
D : Collection

Q.no 18. Which of the following stops execution of a thread?

rP
A : Calling SetPriority() method on a Thread object

B : Calling notify() method on an object

C : Calling wait() method on an object


te
D : Calling read() method on an InputStream object

Q.no 19. Which JSP life cycle is in the correct order?


as

A : Translation → Initializing → Request Processing → Destroying

B : Translation → Request Processing → Initializing → Destroying


M

C:

D:
in

Q.no 20. It is a collection that cannot contain duplicate element

A : List
ed

B : Queue

C : Set
at

D : Collection

Q.no 21. Which Interface allows a servlet to obtain configutation when needed
re

A : ServletRequest

B : ServletResponse
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 137/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Servlet

r
D : ServletConfig

i to
Q.no 22. JSP page perform request processing by calling which method?

A : jsp_Service

Ed
B : service

C : jspService

D : _jspService

DF
Q.no 23. Which implicit object of JSP is associated with the Output Stream of response object?

A : write

rP
B : out

C : response

D : responseWriter
te
Q.no 24. Which implicit object is only available to a JSP page which is designated as error pages?

A : application
as

B : Throwable

C : runnable
M

D : exception

Q.no 25. Which of these standard collection classes implements a dynamic array?
in

A : AbstractList

B : LinkedList
ed

C : ArrayList

D : AbstractSet
at

Q.no 26. Which methods are used to bind the objects on HttpSession instance and get the
objects?

A : setAttribute()
re

B : getAttribute()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 138/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Both A & B()

r
D : putAttribute()

i to
Q.no 27. Which method is used to send the same request and response objects to another servlet
in RequestDispatcher ?

Ed
A : forward()

B : sendRedirect()

C : Both 1 & 2

DF
D : send()

Q.no 28. How can you start a database transaction in the database?

A : By asking a Transaction object to your Connection, and calling the method begin() on it

rP
B : By asking a Transaction object to your Connection, and setting the autoCommit property of the
Transaction to false

C : By calling the method beginTransaction() on the Connection object


te
D : By setting the autoCommit property of the Connection to false, and execute a statement in the
database
as
Q.no 29. What programming language(s) or scripting language(s) does Java Server Pages (JSP)
support?

A : VBScript only
M

B : Jscript only

C : Java only
in

D : Text only

Q.no 30. JDBC technology-based drivers generally fit into how many categories?
ed

A:4

B:3

C:2
at

D:5
re

Q.no 31. In the following JDBC drivers which is known as fully java driver?

A : Native-API driver

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 139/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : Network Protocol driver

r
C : Thin driver

i to
D : Both 2& 3

Q.no 32. Which of these method wakes up the first thread that called wait()?

Ed
A : wait()

B : notify()

C : start()

DF
D : notifyAll()

Q.no 33. A JSP page consists of which tags?

rP
A : HTML tags

B : JSP tags

C : Both 1 & 2
te
D : Notag

Q.no 34. What is synchronization in reference to a thread?


as

A : It’s a process of handling situations when two or more threads need access to a shared resource

B : It’s a process by which many thread are able to access same shared resource simultaneously
M

C : It’s a process by which a method is able to access many different threads simultaneously

D : It’s a method that allow too many threads to access any information that require
in

Q.no 35. Java code is embedded under which tag in JSP?

A : Declaration
ed

B : Scriptlet

C : Expression
at

D : Comment

Q.no 36. What is the Output of following Java Program? q23.jpg


re

A : java.util.LinkedList

B : String
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 140/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Compiler Error

r
D : Syntax Error

i to
Q.no 37. Which of the following is not a directive in JSP?

A : page directive

Ed
B : include directive

C : taglib directive

D : command directive

DF
Q.no 38. Which of this method is used to insert value and its key in HashTable?

A : put()

rP
B : set()

C : insertElement()

D : addElement()
te
Q.no 39. Which packages represent interfaces and classes for servlet API?

A : javax.servlet
as

B : javax.servlet.http

C : Both 1 & 2
M

D : java

Q.no 40. Which method is used for an SQL statement that is executed frequently?
in

A : prepareStatement

B : prepareCall
ed

C : createStatement

D : simpleStatement
at

Q.no 41. Which of the following is true about autoFlush Attribute?

A : The autoFlush attribute can specify that buffered output should be flushed automatically when the
buffer is filled.
re

B : The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 141/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Both of the above

r
D : None

i to
Q.no 42. Which are the examples of Application Server?

A : Tomcat

Ed
B : Weblogic

C : JBoss

D : Both 2 and 3

DF
Q.no 43. Where the stored procedures reside?

A : In side server memory

rP
B : In side cache

C : Inside database

D : In side browser
te
Q.no 44. JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you
can do with Java servlets.
as
A : TRUE

B : FALSE
M

C:

D:

Q.no 45. Type-2 driver called as


in

A : Native-protocol, pure Java driver

B : JDBC-Net, pure Java driver


ed

C : Native-API, partly Java driver

D : JDBC-ODBC Bridge plus ODBC driver


at

Q.no 46. which tag can hold any Java language expression that can be used as an argument
to out.println() method.
re

A : Expression tag

B : Declaration Tag/label>

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 142/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Directive Tag

r
D : Scriplet Tag

i to
Q.no 47. By default cursor is pointing to

A : Column Header

Ed
B : First Record

C : Last Record

D : Middle Record

DF
Q.no 48. Which of the following is true about info Attribute?

A : The info attribute lets you provide a description of the JSP

rP
B : The info attribute is used by JSP container for optimization of generated servlet code.

C : Both of the above.

D : None
te
Q.no 49. What is the Output of following Java Program? q34.jpg

A : 12885
as

B : 12845

C : 58881
M

D : 54881

Q.no 50. Which implicit object of JSP is equivalent to this variable of Java programming
language?
in

A : page

B : pageContext
ed

C : config

D : application
at

Q.no 51. Which method in session tracking is used in a bit of information that is sent by a web
server to a browser and which can later be read back from that browser?
re

A : HttpSession

B : URL rewriting

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 143/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Cookies

r
D : Hidden form fields

i to
Q.no 52. Which class can handle any type of request so that it is protocol-independent?

A : GenericServlet

Ed
B : HttpServlet

C : Both 1 & 2

D : ContextServlet

DF
Q.no 53. Which JDBC driver Type(s) can be used in either applet or servlet code?

A : Both Type 1 and Type 2

rP
B : Both Type 1 and Type 3

C : Both Type 3 and Type 4

D : Type 4 only
te
Q.no 54. Which of the following tag is used to declare error pages in the Deployment Descriptor
for the entire Web Apllication?
as
A : <error>

B : <page>
M

C : <errorPage>

D : <error-page>

Q.no 55. Which of the following attributes are mandatory in <jsp:getProperty /> tag?
in

A : name, property

B : type, id
ed

C : name, type

D : id, property
at

Q.no 56. Which can generate HTML dynamically on the client but can hardly interact with the
web server to perform complex tasks like database access and image processing etc. in JSP?
re

A : vs.Static HTML

B : vs.Server-Side Includes

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 144/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C: vs.Pure Servlets

r
D : Vs.JavaScript

i to
Q.no 57. Deque and Queue are derived from:

A : AbstractList

Ed
B : Collection

C : AbstractCollection

D : List

DF
Q.no 58. Which JDBC driver Types are for use over communications networks?

A : Type 3 only

rP
B : Type 4 only

C : Both Type 3 and Type 4

D : Neither Type 3 nor Type 4


te
Q.no 59. Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web
server and the DBMS are running on the same machine?
as
A : Type 1 only

B : Type 2 only
M

C : Both Type 3 and Type 4

D : All the above

Q.no 60. Which HTTP Request method is non-idempotent?


in

A : GET

B : POST
ed

C : Both 1 & 2

D : ENV
at

Q.no 1. What will happen if two thread of the same priority are called to be processed
simultaneously?
re

A : Anyone will be executed first lexographically

B : Both of them will be executed simultaneously

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 145/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : None of them will be executed

r
D : It is dependent on the operating system

i to
Q.no 2. Which type of Statement can execute parameterized queries?

A : PreparedStatement

Ed
B : ParameterizedStatement

C : ParameterizedStatement and CallableStatement

D : Executable Statement

DF
Q.no 3. What requires less resources?

A : Thread

rP
B : Process

C : Thread and Process

D : Neither Thread nor Process


te
Q.no 4. JSP includes a mechanism for defining

A : static attributes
as

B : local attributes

C : dynamic attributes
M

D : global attributes

Q.no 5. Choose an incorrect statement from the following.


in

A : . JSP pages are easier to maintain than a servlet.

B : The Web Container translate a Servlet into JSP page


ed

C : JSP is built on Java Technology so it is platform independent

D : A JSP page seperates presentation and business logic.


at

Q.no 6. Which of these classes is not part of Java’s collection framework?

A : Maps
re

B : Array

C : Stack
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 146/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Queue

r
Q.no 7. Name the method defined in the HttpServletResponse class that may be used to set the

i to
content type. Select the one correct answer.

A : setContent

Ed
B : setType

C : setContentType

D : setResponseContentType

DF
Q.no 8. What is the full form of JSP?

A : Java servlet program

B : Java server pages

rP
C : Java server program

D : Java Same pages

Q.no 9. Which of the following code is used to get PrintWriter object in servlet?
te
A : respose.getWriter()
as
B : request.getWriter()

C : new PrintWriter()
M

D : PrintWriter()

Q.no 10. Which of the following code is used to get an attribute in a HTTP Session object in
servlets?
in

A : session.getAttribute(String name)

B : session.alterAttribute(String name)
ed

C : session.updateAttribute(String name)

D : session.setAttribute(String name)
at

Q.no 11. Default value of a java thread is

A:0
re

B:1

C:5

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 147/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : 10

r
Q.no 12. When doGet() method of servlet gets called?

i to
A : GET request results from a normal request for a URL.

B : The service() method checks the HTTP request type as GET and calls doGet() method.

Ed
C : Both of above

D : When Invoked then

Q.no 13. Which of the following method can be used to create a connection object?

DF
A : getConnection(String url,String user,String pass)

B : getConnection(String url)

rP
C : getConnection(String url,Properties Prop)

D : All mentioned used

Q.no 14. Which two interfaces does the javax.servlet.jsp package have?
te
A : Page

B : HttpJspPage
as

C : JspriWter

D : PageContext
M

Q.no 15. Execution of a java thread begins on which method call?

A : Start ()
in

B: Run ()

C : Execute ()
ed

D: Launch ()

Q.no 16. Which of the following leads to high network traffic?


at

A : URL rewriting

B : Hidden form fields


re

C : SSL sessions

D : Cookies
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 148/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 17. Which of the following is a correct constructor for thread?

r
A : Thread(Runnable a, String str)

i to
B : Thread(int priority)

C : Thread(Runnable a, int priority)

Ed
D : Thread(Runnable a, ThreadGroup t)

Q.no 18. Which type of driver converts JDBC calls into the network protocol used by the
database management system directly?

DF
A : Type 1 driver

B : Type 2 driver

C : Type 3 driver

rP
D : Type 4 driver

Q.no 19. Which class can handle any type of request so that it is protocol-independent?

A : GenericServlet
te
B : HttpServlet
as
C : Both A & B

D : Servlet
M

Q.no 20. What is, in terms of JDBC, a DataSource?

A : A DataSource is the basic service for managing a set of JDBC drivers

B : A DataSource is the Java representation of a physical data source


in

C : A DataSource is a registry point for JNDI-services

D : A DataSource is a factory of connections to a physical data source


ed

Q.no 21. What is Servlet Hierachy :i) GenericServlet ii)HttpServlet iii) Servlet iv) MyServlet

A : I,ii,iii,iv
at

B : iii,ii,iv,i

C : iii,I,ii,iv
re

D : ii,I,iv,iii

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 149/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 22. Which class has traditionally been the backbone of the JDBC architecture?

r
A : the JDBC driver manager

i to
B : The JDBC driver test suite

C : The JDBC-ODBC bridge

Ed
D : Java API Bridge

Q.no 23. Which method we implement from Runnable interface?

A : Run ()

DF
B : Start ()

C : Execute ()

rP
D : call ()

Q.no 24. Which of these method is used to tell the calling thread to give up a monitor and go to
sleep until some other thread enters the same monitor?

A : wait()
te
B : notify()
as
C : notifyAll()

D : sleep()
M

Q.no 25. What is the reason that a java program cannot directly communicate with an ODBC
driver?

A : ODBC written in C# language


in

B : ODBC written in C language

C : ODBC written in C++ language


ed

D : ODBC written in COBOL language

Q.no 26. Which of these method wakes up all the threads?


at

A : wakeAll()

B : notify()
re

C : start()

D : notifyAll()

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 150/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 27. Which of the following statements are correct about the status of the Http response.

r
A : A status of 200 to 299 signifies that the request was successful

i to
B : A status of 300 to 399 are informational messages

C : A status of 400 to 499 indicates an error in the server

Ed
D : A status of 500 to 599 indicates an error in the client

Q.no 28. Which of these interface declares core method that all collections will have?

A : set

DF
B : EventListner

C : Comparator

rP
D : Collection

Q.no 29. Which type of ServletEngine is a server that includes built-in support for servlets?

A : Add-on ServletEngine
te
B : Embedded ServletEngine

C : Standalone ServletEngine
as

D : Dowloaded ServletEngine

Q.no 30. Which result set generally does not show changes to the underlying database that are
M

made while it is open. The membership, order, and column values of rows are typically fixed
when the result set is created?

A : TYPE_FORWARD_ONLY
in

B : TYPE_SCROLL_INSENSITIVE

C : TYPE_SCROLL_SENSITIVE
ed

D : TYPE_SCROLL

Q.no 31. Sessions is a part of the SessionTracking and it is for maintaining the client state at
server side.
at

A : TRUE

B : False
re

C:

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 151/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D:

r
Q.no 32. The ResultSet.next method is used to move to the next row of the ResultSet, making it

i to
the current row.

A : TRUE

Ed
B : FALSE

C:

D:

DF
Q.no 33. Which object of HttpSession can be used to view and manipulate information about a
session?

A : session identifier

B : creation time

rP
C : last accessed time

D : Mentioned all of above


te
Q.no 34. Which of the scripting of JSP not putting content into service method of the converted
servlet?
as
A : Declarations

B : Scriptlets
M

C : Expressions

D : Include

Q.no 35. Which method is used to execute a SQL select statement and returns a results?
in

A : Execute( )

B : cancel ( )
ed

C : executeQuery()

D : Open ( )
at

Q.no 36. Which is not a directive?

A : include
re

B : page

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 152/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : export

r
D : useBean

i to
Q.no 37. Which option is true about session scope?

A : Objects are accessible only from the page in which they are created

Ed
B : Objects are accessible only from the pages which are in same session

C : Objects are accessible only from the pages which are processing the same request

D : Objects are accessible only from the pages which reside in same application

DF
Q.no 38. The following attribute in Taglib directive is used to distinguish the custom tag from
other library custom tag.

A : Page

rP
B : Prefix

C : URI

D : URL
te
Q.no 39. Which method is used to make main thread to wait for all child threads
as
A : Join ()

B : Sleep ()
M

C : Wait ()

D : Stop ()

Q.no 40. Which of the following code retrieves the MIME type of the body of the request?
in

A : new MimeType()

B : request.getContentType()
ed

C : response.getContentType()

D : getContent()
at

Q.no 41. Servlet technology is used to create web application

A : TRUE
re

B : FALSE

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 153/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C:

r
D:

i to
Q.no 42. What is the output of the prg. q33.jpg

A : abcdef

Ed
B : defabc

C : abcabc

D : defdef

DF
Q.no 43. Which method is used to find the number of column in ResultSet?

A : getNumberOfColumn()

rP
B : getMaxColumn()

C : getColumnCount()

D : getColumns()
te
Q.no 44. RowSet is belong to which package?

A : java.sql
as

B : javax.sql

C : java.jdbc
M

D : javax.jdbc

Q.no 45. Which allows the storage of a null key and many null values?
in

A : Hashtable

B : HashMap
ed

C : Both

D : Tree
at

Q.no 46. Which attribute specifies a JSP page that should process any exceptions thrown but not
caught in the current page?

A : The ErrorPage Attribute


re

B : The IsErrorPage Attribute

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 154/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

C : Both 1 & 2

r
D : PageAttribute

i to
Q.no 47. The default capacity of a ArrayList is:

A : 12

Ed
B : 16

C:1

D : 10

DF
Q.no 48. Which of the following is true about Initialization phase in JSP life cycle?

A : When a container loads a JSP it invokes the jspInit() method before servicing any requests

rP
B : Container invokes _jspService() method during Initialization phase.

C : Both of the above.

D : Container invokes _jspDestroy() method during Initialization phase.


te
Q.no 49. Which is faster and uses less memory?

A : ListEnumeration
as

B : Iterator

C : Enumeartion
M

D : ListIterator

Q.no 50. What implementation of Iterator can traverse a collection in both directions?
in

A : Iterator

B : ListIterator
ed

C : SetInterator

D : MapInterator
at

Q.no 51. How do you know in your Java program that a SQL warning is generated as a result of
executing a SQL statement in the database?

A : You must catch the checked SQLException which is thrown by the method which executes the
re

statement

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 155/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : You must catch the unchecked SQLWarningException which is thrown by the method which

r
executes the statement

i to
C : You must invoke the getWarnings() method on the Statement object (or a sub interface thereof)

D : You must query the ResultSet object about possible warnings generated by the database

Ed
Q.no 52. Which of the following is true about Cleanup phase in JSP life cycle?

A : The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a
container.

B : The jspDestroy() method is the JSP equivalent of the destroy method for servlets.

DF
C : Both of the above

D : None

Q.no 53. If your Java application is accessing multiple types of databases at the same time, which

rP
type of driver is the preferred driver.

A : Type-1

B : Type-2
te
C : Type-3
as
D : Type-4

Q.no 54. Which are the examples of Application Server?


M

A : Tomcat

B : Weblogic

C : JBoss
in

D : Both 2 and 3

Q.no 55. What the Class.forName() does?


ed

A : Established the connection with database

B : Load the specified driver class


at

C : Register a driver

D : none of these
re

Q.no 56. Which one of the following scopes does the attribute in servlet is an object that can be
set, get or removed?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 156/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : session scope

r
B : request scope

i to
C : application scope

D : Mentioned all of above

Ed
Q.no 57. We can get the Database details using?

A : DatabaseDetails

B : DatabaseServerData

DF
C : DatabaseRawData

D : DatabaseMetaData

rP
Q.no 58. Which of the following is true about autoFlush Attribute?

A : The autoFlush attribute can specify that buffered output should be flushed automatically when the
buffer is filled.

B : The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.
te
C : Both of the above
as
D : None

Q.no 59. Which directive tells the Web Container to copy everything in the included file and
paste it into current JSP file?
M

A : taglib

B : Page
in

C : include

D : exclude
ed

Q.no 60. In HTTP Request what asks for the loopback of the request message, for testing or for
troubleshooting?

A : PUT
at

B : OPTIONS

C : DELETE
re

D : TRACE

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 157/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 1. Which of the following describes the correct sequence of the steps involved in making a

r
connection with a database. 1. Loading the driver
2. Process the resul

i to
A : 1,3,4,2

B : 1,2,3,4

Ed
C : 2,1,3,4

D : 4,1,2,3

Q.no 2. Which of the following manages a list of database drivers in JDBC?

DF
A : DriverManager

B : JDBC driver

C : Connection

rP
D : Statement

Q.no 3. How can we destroy a session?


te
A : session.discontinue()

B : session.invalidate()
as

C : session.disconnect()

D : session.falsify()
M

Q.no 4. Choose the statement that best describes the relationship between JSP and servlets:

A : Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime usage.
in

B : JSP and servlets are unrelated technologies.

C : Servlets and JSP are competing technologies for handling web requests. Servlets are being
superseded by JSP, which is preferred. The two technologies are not useful in combination.
ed

D : JSPs are built on servlet semantics and all JSPs are compiled to servlets for runtime usage.

Q.no 5. Which of these are types of multitasking?


at

A : Process based

B : Thread based
re

C : Process and Thread based

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 158/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : Scheduler based

r
Q.no 6. ODBC is not appropriate for direct use from java because it uses a

i to
A : C interface

B : C# interface

Ed
C : java interface

D : Both A and C

Q.no 7. What is maximum thread priority in Java

DF
A : 10

B : 12

rP
C:5

D:8

Q.no 8. Which of the following will ensure the thread will be in running state?
te
A : yield()

B : notify()
as

C : wait()

D : Thread.killThread()
M

Q.no 9. PageContext is instance of which class?

A : javax.servlet.ServletContext
in

B : javax.servlet.ServletConfig

C : javax.servlet.jsp.PageContext
ed

D : javax.servlet.Application

Q.no 10. Which of these statements is incorrect?


at

A : By multithreading CPU idle time is minimized, and we can take maximum use of it

B : By multitasking CPU idle time is minimized, and we can take maximum use of it
re

C : Two thread in Java can have the same priority

D : A thread can exist only in two states, running and blocked


https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 159/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 11. It is a collection that cannot contain duplicate element

r
A : List

i to
B : Queue

C : Set

Ed
D : Collection

Q.no 12. Why will you set auto commit mode to false?

A : To increase the performance

DF
B : To maintain the integrity of business process

C : To use distributed transactions

rP
D : Does all mentioned

Q.no 13. Which JSP life cycle is in the correct order?

A : Translation → Initializing → Request Processing → Destroying


te
B : Translation → Request Processing → Initializing → Destroying

C:
as

D:

Q.no 14. Which method of ListIterator is used to obtain index of previous element?
M

A : previous()

B : previousIndex()
in

C : back()

D : goBack()
ed

Q.no 15. Which method is applied to the database only when Auto Commit is set to false.

A : Commit
at

B : close

C : open
re

D : terminate.

Q.no 16. What is a Hidden Comment in JSP?


https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 160/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : <%– –%>

r
B : <%– %>

i to
C : <% !!! %>

D : <% &&&%>

Ed
Q.no 17. What are scripting languages?

A : The programming languages that pre decide the web page content

B : The programming languages that are simpler and offer same protection

DF
C : The programming languages that trade off simplicity for protection

D : Complicates application

rP
Q.no 18. Which of these methods sets every element of a List to a specified object?

A : set()

B : fill()
te
C : Complete()

D : add()
as

Q.no 19. How can you execute a stored procedure in the database?

A : Call method execute() on a CallableStatement object


M

B : Call method executeProcedure() on a Statement object

C : Call method execute() on a StoredProcedure object


in

D : Call method run() on a ProcedureCommand object

Q.no 20. The life cycle of servlet is managed by


ed

A : servlet container

B : servlet context
at

C : both a and b

D : None of above
re

Q.no 21. The Mechanism used by the web container to store session information for a particular
user is

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 161/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : Request Management

r
B : Container Management

i to
C : Response Management

D : Session Management

Ed
Q.no 22. Protocol used for handling Get and Post requests are

A : SMTP

B : FTP

DF
C : HTTP

D : POP3

rP
Q.no 23. Which JDBC drivers will run your program?

A : The JDBC-ODBC bridge

B : The JDBC driver manager


te
C : The JDBC driver test suite

D : Partly Java Driver


as

Q.no 24. Drivers that are JDBC Compliant should normally support scrollable result sets, but
they are not required to do so
M

A : TRUE

B : FALSE

C:
in

D:

Q.no 25. Which interface is used to access information about the database.
ed

A : Database

B : DatabaseMetaData
at

C : Result Set

D : GetData
re

Q.no 26. Which of the following is not a directive in JSP?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 162/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : page directive

r
B : include directive

i to
C : taglib directive

D : command directive

Ed
Q.no 27. What is used to execute parameterized query?

A : Statement interface

B : PreparedStatement interface

DF
C : ResultSet interface

D : None of the above

rP
Q.no 28. Using mail API we cannot send mail from a servlet.

A : TRUE

B : False
te
C:

D:
as

Q.no 29. Which method used to return the last time the client sent request associated with
session.
M

A : getCreationTime()

B : getLastAccessedTime()

C : getMaxInterval()
in

D : getReturnTime()

Q.no 30. Which of the following is not a valid attribute of a page directives?
ed

A : language

B : extend
at

C : export

D : import
re

Q.no 31. Which of these standard collection classes implements a dynamic array?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 163/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : AbstractList

r
B : LinkedList

i to
C : ArrayList

D : AbstractSet

Ed
Q.no 32. Which of these iterators can be used only with List?

A : SetIterator

B : ListIterator

DF
C : Literator

D : Comparator

rP
Q.no 33. JSP page perform request processing by calling which method?

A : jsp_Service

B : service
te
C : jspService

D : _jspService
as

Q.no 34. ResultSet object can be moved forward only and it is updatable.

A : TRUE
M

B : FALSE

C:
in

D:

Q.no 35. How can you start a database transaction in the database?
ed

A : By asking a Transaction object to your Connection, and calling the method begin() on it

B : By asking a Transaction object to your Connection, and setting the autoCommit property of the
Transaction to false
at

C : By calling the method beginTransaction() on the Connection object

D : By setting the autoCommit property of the Connection to false, and execute a statement in the
re

database

Q.no 36. What is the Output of following Java Program? q23.jpg

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 164/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : java.util.LinkedList

r
B : String

i to
C : Compiler Error

D : Syntax Error

Ed
Q.no 37. How many steps are used to connect any java application using JDBC?

A:5

B:4

DF
C:3

D:6

rP
Q.no 38. Which method in Transaction makes all changes.

A : Commit()

B : rollback()
te
C : Savepoint()

D : getAutoCommit()
as

Q.no 39. Which statement is true for the class java.util.HashSet?

A : The elements in the collection are ordered.


M

B : The collection is guaranteed to be immutable.

C : The elements in the collection are guaranteed to be unique.


in

D : The elements in the collection are accessed using a unique key

Q.no 40. Which of these method wakes up the first thread that called wait()?
ed

A : wait()

B : notify()
at

C : start()

D : notifyAll()
re

Q.no 41. Deque and Queue are derived from:

A : AbstractList
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 165/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : Collection

r
C : AbstractCollection

i to
D : List

Q.no 42. Which JDBC driver Types are for use over communications networks?

Ed
A : Type 3 only

B : Type 4 only

C : Both Type 3 and Type 4

DF
D : Neither Type 3 nor Type 4

Q.no 43. JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you
can do with Java servlets.

rP
A : TRUE

B : FALSE

C:
te
D:
as
Q.no 44. Which of the following tag is used to declare error pages in the Deployment Descriptor
for the entire Web Apllication?

A : <error>
M

B : <page>

C : <errorPage>
in

D : <error-page>

Q.no 45. Which can generate HTML dynamically on the client but can hardly interact with the
web server to perform complex tasks like database access and image processing etc. in JSP?
ed

A : vs.Static HTML

B : vs.Server-Side Includes
at

C: vs.Pure Servlets

D : Vs.JavaScript
re

Q.no 46. Where the stored procedures reside?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 166/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : In side server memory

r
B : In side cache

i to
C : Inside database

D : In side browser

Ed
Q.no 47. Which JDBC driver Type(s) can be used in either applet or servlet code?

A : Both Type 1 and Type 2

B : Both Type 1 and Type 3

DF
C : Both Type 3 and Type 4

D : Type 4 only

rP
Q.no 48. Which method in session tracking is used in a bit of information that is sent by a web
server to a browser and which can later be read back from that browser?

A : HttpSession

B : URL rewriting
te
C : Cookies
as
D : Hidden form fields

Q.no 49. Which of the following is true about info Attribute?


M

A : The info attribute lets you provide a description of the JSP

B : The info attribute is used by JSP container for optimization of generated servlet code.

C : Both of the above.


in

D : None

Q.no 50. Which class can handle any type of request so that it is protocol-independent?
ed

A : GenericServlet

B : HttpServlet
at

C : Both 1 & 2

D : ContextServlet
re

Q.no 51. Which JDBC driver Type(s) can you use in a three-tier architecture and if the Web
server and the DBMS are running on the same machine?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 167/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : Type 1 only

r
B : Type 2 only

i to
C : Both Type 3 and Type 4

D : All the above

Ed
Q.no 52. which tag can hold any Java language expression that can be used as an argument
to out.println() method.

A : Expression tag

DF
B : Declaration Tag/label>

C : Directive Tag

D : Scriplet Tag

rP
Q.no 53. By default cursor is pointing to

A : Column Header

B : First Record
te
C : Last Record
as
D : Middle Record

Q.no 54. Type-2 driver called as


M

A : Native-protocol, pure Java driver

B : JDBC-Net, pure Java driver

C : Native-API, partly Java driver


in

D : JDBC-ODBC Bridge plus ODBC driver

Q.no 55. Which implicit object of JSP is equivalent to this variable of Java programming
ed

language?

A : page
at

B : pageContext

C : config
re

D : application

Q.no 56. Which of the following attributes are mandatory in <jsp:getProperty /> tag?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 168/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : name, property

r
B : type, id

i to
C : name, type

D : id, property

Ed
Q.no 57. What is the Output of following Java Program? q34.jpg

A : 12885

B : 12845

DF
C : 58881

D : 54881

rP
Q.no 58. Which HTTP Request method is non-idempotent?

A : GET

B : POST
te
C : Both 1 & 2

D : ENV
as

Q.no 59. In HTTP Request what asks for the loopback of the request message, for testing or for
troubleshooting?
M

A : PUT

B : OPTIONS

C : DELETE
in

D : TRACE

Q.no 60. Which are the examples of Application Server?


ed

A : Tomcat

B : Weblogic
at

C : JBoss

D : Both 2 and 3
re

Q.no 1. Which method of stack returns the element on the top of the stack by not removing it

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 169/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : search()

r
B : pop()

i to
C : peek()

D : push()

Ed
Q.no 2. What is the maximum size of cookie?

A : 4 KB

B : 4 MB

DF
C : 4 bytes

D : 40 KB

rP
Q.no 3. How can you retrieve information from a ResultSet?

A : By invoking the method get(…, String type) on the ResultSet, where type is the database type

B : By invoking the method get(…, Type type) on the ResultSet, where Type is an object which
represents a database type
te
C : By invoking the method getValue(…), and cast the result to the desired Java type
as
D : By invoking the special getter methods on the ResultSet: getString(…), getBoolean (…),
getClob(…),…

Q.no 4. Which of the following is stored at client side?


M

A : URL rewriting

B : Hidden form fields


in

C : SSL sessions

D : Cookies
ed

Q.no 5. When doGet() method of servlet gets called?

A : GET request results from a normal request for a URL.


at

B : The service() method checks the HTTP request type as GET and calls doGet() method.

C : Both of above
re

D : When Invoked then

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 170/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 6. What will happen if two thread of the same priority are called to be processed

r
simultaneously?

i to
A : Anyone will be executed first lexographically

B : Both of them will be executed simultaneously

Ed
C : None of them will be executed

D : It is dependent on the operating system

Q.no 7. Which action tags are used in JSP for developing web application with Java Bean?

DF
A : jsp:useBean

B : jsp:setProperty

C : jsp:getProperty

rP
D : Both B & C

Q.no 8. pageContext is an implicit object in jsp.

A : TRUE
te
B : FALSE
as
C:

D:
M

Q.no 9. Which of the following stops execution of a thread?

A : Calling SetPriority() method on a Thread object

B : Calling notify() method on an object


in

C : Calling wait() method on an object

D : Calling read() method on an InputStream object


ed

Q.no 10. What is a Expression in JSP?

A : <%= %>
at

B : <% %>

C : <* *>
re

D : <? ?>

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 171/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 11. The Interface ResultSet has a method getMataData() that returns

r
A : Tuple

i to
B : Value

C : Object

Ed
D : Result

Q.no 12. The database system compiles query when it is

A : Executed

DF
B : Initiated

C : Prepared

rP
D : Invoked

Q.no 13. What is the full form of JSP?

A : Java servlet program


te
B : Java server pages

C : Java server program


as

D : Java Same pages

Q.no 14. Which Interface in java is not allowing null values?


M

A : HashMap

B : TreeMap
in

C : LinkedHashMap

D : Set
ed

Q.no 15. What is, in terms of JDBC, a DataSource?

A : A DataSource is the basic service for managing a set of JDBC drivers


at

B : A DataSource is the Java representation of a physical data source

C : A DataSource is a registry point for JNDI-services


re

D : A DataSource is a factory of connections to a physical data source

Q.no 16. Which two interfaces does the javax.servlet.jsp package have?
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 172/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : Page

r
B : HttpJspPage

i to
C : JspriWter

D : PageContext

Ed
Q.no 17. Which of these classes is not part of Java’s collection framework?

A : Maps

B : Array

DF
C : Stack

D : Queue

rP
Q.no 18. The hasNext method returns true if the iteration has more elements.

A : True

B : False
te
C:

D:
as

Q.no 19. Which of the following is true about servlets?

A : Servlets execute within the address space of web server


M

B : Servlets are platform-independent because they are written in java

C : Servlets can use the full functionality of the Java class libraries
in

D : Servlets execute within the address space of web server, platform independent and uses the
functionality of java class libraries

Q.no 20. Which attribute specifies threding model in page directive in jsp.
ed

A : info

B : threadmod
at

C : isThreadSafe

D : language
re

Q.no 21. Which Interface allows a servlet to obtain configutation when needed

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 173/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : ServletRequest

r
B : ServletResponse

i to
C : Servlet

D : ServletConfig

Ed
Q.no 22. Which of these method wakes up all the threads?

A : wakeAll()

B : notify()

DF
C : start()

D : notifyAll()

rP
Q.no 23. Sessions is a part of the SessionTracking and it is for maintaining the client state at
server side.

A : TRUE

B : False
te
C:
as
D:

Q.no 24. In the following JDBC drivers which is known as fully java driver?
M

A : Native-API driver

B : Network Protocol driver

C : Thin driver
in

D : Both 2& 3

Q.no 25. Which class has traditionally been the backbone of the JDBC architecture?
ed

A : the JDBC driver manager

B : The JDBC driver test suite


at

C : The JDBC-ODBC bridge

D : Java API Bridge


re

Q.no 26. A JSP page consists of which tags?

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 174/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

A : HTML tags

r
B : JSP tags

i to
C : Both 1 & 2

D : Notag

Ed
Q.no 27. The following attribute in Taglib directive is used to distinguish the custom tag from
other library custom tag.

A : Page

DF
B : Prefix

C : URI

D : URL

rP
Q.no 28. State true or false: Executing programs at the client side is slower than executing
programs on the server

A : TRUE
te
B : FALSE

C:
as

D:

Q.no 29. RowSet object is non-scrollable and non-updatable by default.


M

A : TRUE

B : FALSE
in

C:

D:
ed

Q.no 30. Which are the session tracking techniques? i. URL rewriting
ii. Using HTTPSession Class
iii.Using response object
iv. Using hidden form fields
v. Using cookies
at

vi. Using servlet object

A : i, ii, iii, vi
re

B : i, ii, iv, v

C : i, vi, iii, v
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 175/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : i, ii, iii, v

r
Q.no 31. Which of the following action variable is used to include a file in JSP?

i to
A : jsp:setProperty

B : jsp:getProperty

Ed
C : jsp:include

D : jsp:plugin

Q.no 32. What programming language(s) or scripting language(s) does Java Server Pages (JSP)

DF
support?

A : VBScript only

B : Jscript only

rP
C : Java only

D : Text only

Q.no 33. What is the reason that a java program cannot directly communicate with an ODBC
te
driver?

A : ODBC written in C# language


as

B : ODBC written in C language

C : ODBC written in C++ language


M

D : ODBC written in COBOL language

Q.no 34. JDBC is a Java API that is used to connect and execute query to the database
in

A : TRUE

B : FALSE
ed

C:

D:
at

Q.no 35. Which implicit object of JSP is associated with the Output Stream of response object?

A : write
re

B : out

C : response

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 176/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : responseWriter

r
Q.no 36. Which is not a directive?

i to
A : include

B : page

Ed
C : export

D : useBean

Q.no 37. What is the Output of following Java Program? q24.jpg

DF
A : Geeks for Geeks GeeksforGeeks

B : GeeksforGeeks GeeksforGeeks

rP
C : Runtime Error

D : Compilation Error

Q.no 38. Which of the below does not implement Map interface?
te
A : HashMap

B : Hashtable
as

C : EnumMap

D : Vector
M

Q.no 39. “out” is implicit object of which class?

A : javax.servlet.jsp.PrintWriter
in

B : javax.servlet.jsp.SessionWriter

C : javax.servlet.jsp.SessionPrinter
ed

D : javax.servlet.jsp.JspWriter

Q.no 40. Which method must be implemented by a Java thread?


at

A: run()

B : execute()
re

C : start()

D : paint()
https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 177/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

Q.no 41. If your Java application is accessing multiple types of databases at the same time, which

r
type of driver is the preferred driver.

i to
A : Type-1

B : Type-2

Ed
C : Type-3

D : Type-4

Q.no 42. What implementation of Iterator can traverse a collection in both directions?

DF
A : Iterator

B : ListIterator

C : SetInterator

rP
D : MapInterator

Q.no 43. Which one of the following scopes does the attribute in servlet is an object that can be
set, get or removed?
te
A : session scope

B : request scope
as

C : application scope

D : Mentioned all of above


M

Q.no 44. Which attribute specifies a JSP page that should process any exceptions thrown but not
caught in the current page?

A : The ErrorPage Attribute


in

B : The IsErrorPage Attribute

C : Both 1 & 2
ed

D : PageAttribute

Q.no 45. The default capacity of a ArrayList is:


at

A : 12

B : 16
re

C:1

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 178/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : 10

r
Q.no 46. Which allows the storage of a null key and many null values?

i to
A : Hashtable

B : HashMap

Ed
C : Both

D : Tree

Q.no 47. We can get the Database details using?

DF
A : DatabaseDetails

B : DatabaseServerData

rP
C : DatabaseRawData

D : DatabaseMetaData

Q.no 48. What the Class.forName() does?


te
A : Established the connection with database

B : Load the specified driver class


as

C : Register a driver

D : none of these
M

Q.no 49. Which directive tells the Web Container to copy everything in the included file and
paste it into current JSP file?

A : taglib
in

B : Page

C : include
ed

D : exclude

Q.no 50. What is the output of the prg. q33.jpg


at

A : abcdef

B : defabc
re

C : abcabc

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 179/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : defdef

r
Q.no 51. Which is faster and uses less memory?

i to
A : ListEnumeration

B : Iterator

Ed
C : Enumeartion

D : ListIterator

Q.no 52. Which of the following is true about autoFlush Attribute?

DF
A : The autoFlush attribute can specify that buffered output should be flushed automatically when the
buffer is filled.

B : The autoFlush attribute can specify that an exception should be raised to indicate buffer overflow.

rP
C : Both of the above

D : None

Q.no 53. Which of the following is true about Cleanup phase in JSP life cycle?
te
A : The destruction phase of the JSP life cycle represents when a JSP is being removed from use by a
container.
as

B : The jspDestroy() method is the JSP equivalent of the destroy method for servlets.

C : Both of the above


M

D : None

Q.no 54. Servlet technology is used to create web application


in

A : TRUE

B : FALSE
ed

C:

D:
at

Q.no 55. RowSet is belong to which package?

A : java.sql
re

B : javax.sql

C : java.jdbc

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 180/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

D : javax.jdbc

r
Q.no 56. Which method is used to find the number of column in ResultSet?

i to
A : getNumberOfColumn()

B : getMaxColumn()

Ed
C : getColumnCount()

D : getColumns()

Q.no 57. Which of the following is true about Initialization phase in JSP life cycle?

DF
A : When a container loads a JSP it invokes the jspInit() method before servicing any requests

B : Container invokes _jspService() method during Initialization phase.

rP
C : Both of the above.

D : Container invokes _jspDestroy() method during Initialization phase.

Q.no 58. How do you know in your Java program that a SQL warning is generated as a result of
executing a SQL statement in the database?
te
A : You must catch the checked SQLException which is thrown by the method which executes the
statement
as

B : You must catch the unchecked SQLWarningException which is thrown by the method which
executes the statement
M

C : You must invoke the getWarnings() method on the Statement object (or a sub interface thereof)

D : You must query the ResultSet object about possible warnings generated by the database

Q.no 59. JSPs eventually are compiled into Java servlets, you can do as much with JSPs as you
in

can do with Java servlets.

A : TRUE
ed

B : FALSE

C:

D:
at

Q.no 60. which tag can hold any Java language expression that can be used as an argument
to out.println() method.
re

A : Expression tag

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 181/182
10/22/2020 https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15

B : Declaration Tag/label>

r
C : Directive Tag

i to
D : Scriplet Tag

Ed
DF
rP
te
as
M
in
ed
at
re

https://sppu.wheebox.com/WAC-3/allqusdownloadhtml.ils?testNo=3190&code=1052000&showTest=2371&actForm=edit&set=15 182/182

You might also like