Q.no 1. Which of The Following Is A Correct Constructor For Thread?
Q.no 1. Which of The Following Is A Correct Constructor For Thread?
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.
DF
3) Use of calculator is allowed.
rP
6) Do not use pencils to darken answer.
7) Use only black/blue ball point pen to darken the appropriate circle.
B : Thread(int priority)
D : Thread(Runnable a, ThreadGroup t)
A : TRUE
B : FALSE
at
C:
D:
re
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
Ed
A:0
B:1
C:5
DF
D : 10
rP
A : info
B : threadmod
C : isThreadSafe
te
D : language
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)
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()
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
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.
A : The programming languages that pre decide the web page content
B : The programming languages that are simpler and offer same protection
at
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
Ed
A : Calling SetPriority() method on a Thread 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()
A : PreparedStatement
B : ParameterizedStatement
M
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
DF
Q.no 20. Which tag should be used to pass information from JSP to included JSP?
rP
B : Using <%jsp:param> tag
B : False
M
C:
D:
Q.no 22. Which driver uses ODBC driver to connect to the database?
in
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
r
B : ODBC written in C language
i to
C : ODBC written in C++ 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?
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
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
A : GET
in
B : POST
C : Both 1 & 2
ed
D : ENV
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
r
A : AbstractList
i to
B : Collection
C : AbstractCollection
Ed
D : List
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?
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
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.
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
C : Both 1 & 2
rP
D : PageAttribute
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
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
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
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
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
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
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
A : executable
as
B : simple
C : high level
M
D : parameterized
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
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()
C : SSL sessions
M
D : Cookies
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
DF
A : Map
B : Set
rP
C : TreeSet
D : HashSet
B : The service() method checks the HTTP request type as GET and calls doGet() method.
as
C : Both of above
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
A : <%= %>
DF
B : <% %>
C : <* *>
rP
D : <? ?>
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
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
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 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
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
DF
A : The JDBC-ODBC bridge
rP
C : The JDBC driver test suite
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
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
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
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>
A : 12885
te
B : 12845
as
C : 58881
D : 54881
M
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.
Ed
D : Container invokes _jspDestroy() method during Initialization phase.
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.
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
A : DatabaseDetails
B : DatabaseServerData
in
C : DatabaseRawData
D : DatabaseMetaData
ed
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
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
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
DF
A : abcdef
B : defabc
C : abcabc
rP
D : defdef
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
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
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(…),…
A : static attributes
in
B : local attributes
C : dynamic attributes
ed
D : global attributes
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
DF
A : Servlets execute within the address space of web server
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()
A : wait()
in
B : notify()
C : notifyAll()
ed
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
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
B : 12
as
C:5
D:8
M
A : The programming languages that pre decide the web page content
in
B : The programming languages that are simpler and offer same protection
D : Complicates application
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
r
A : List
i to
B : Queue
C : Set
Ed
D : Collection
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
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
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
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
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.
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
D : Thin driver
M
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
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
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
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
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?
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
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
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
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.
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
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
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
rP
A : Calling SetPriority() method on a Thread object
A : isAlive()
B : run ()
M
C : alive ()
D : keepAlive()
in
D : Both 1 and 2
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
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?
Q.no 11. Which attribute specifies threding model in page directive in jsp.
in
A : info
B : threadmod
ed
C : isThreadSafe
D : language
at
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()
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:
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?
rP
C : Using <%jsp:import> 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
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
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
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
r
A : Geeks for Geeks GeeksforGeeks
i to
B : GeeksforGeeks GeeksforGeeks
C : Runtime Error
Ed
D : Compilation Error
A: run()
DF
B : execute()
C : start()
rP
D : paint()
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
A : Statement interface
B : PreparedStatement interface
re
C : ResultSet interface
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
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.
DF
B : A status of 300 to 399 are informational messages
rP
D : A status of 500 to 599 indicates an error in the client
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
A : AbstractList
M
B : Collection
C : AbstractCollection
in
D : List
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.
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
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.
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
DF
A : abcdef
B : defabc
C : abcabc
rP
D : defdef
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
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:
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
A : wait()
in
B : notify()
C : notifyAll()
ed
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
r
A : <%= %>
i to
B : <% %>
C : <* *>
Ed
D : <? ?>
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?
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
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
r
A : Thread(Runnable a, String str)
i to
B : Thread(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.
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
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
r
A : PreparedStatement
i to
B : ParameterizedStatement
Ed
D : Executable Statement
A : TRUE
DF
B : FALSE
C:
rP
D:
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
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()
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()
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
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?
DF
B : The JDBC driver test suite
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
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
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
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
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
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()
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
DF
A : Column Header
B : First Record
C : Last Record
rP
D : Middle Record
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
Q.no 47. Which JDBC driver Type(s) can be used in either applet or servlet code?
at
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
DF
A : java.sql
B : javax.sql
C : java.jdbc
rP
D : javax.jdbc
A : GET
te
B : POST
as
C : Both 1 & 2
D : ENV
M
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
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.
Ed
D : Container invokes _jspDestroy() method during Initialization phase.
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
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
DF
Q.no 59. Which of the following is true about info Attribute?
B : The info attribute is used by JSP container for optimization of generated servlet code.
rP
C : Both of the above.
D : None
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
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 : <% &&&%>
DF
A : TRUE
B : FALSE
rP
C:
D:
B : Initiated
as
C : Prepared
D : Invoked
M
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
DF
A : next()
B : move()
rP
C : shuffle()
D : hasNext()
B : session.invalidate()
as
C : session.disconnect()
D : session.falsify()
M
A : static attributes
in
B : local attributes
C : dynamic attributes
ed
D : global attributes
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?
B : The service() method checks the HTTP request type as GET and calls doGet() method.
rP
C : Both of above
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
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
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
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
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
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
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:
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:
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
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 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
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
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
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 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 : Register a driver
M
D : none of these
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
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
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
A : <error>
ed
B : <page>
C : <errorPage>
at
D : <error-page>
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:
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
A : URL rewriting
C : SSL sessions
D : Cookies
at
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
rP
B : A DataSource is the Java representation of a physical data source
D : Both 2 and 3
A : Maps
B : Array
ed
C : Stack
D : Queue
at
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?
Ed
B : Using <%jsp:param> 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
A : URL rewriting
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?
rP
C : Calling wait() method on an 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
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()
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
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:
Ed
A : Geeks for Geeks GeeksforGeeks
B : GeeksforGeeks GeeksforGeeks
C : Runtime Error
DF
D : Compilation Error
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?
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.
DF
C : A status of 400 to 499 indicates an error in the server
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?
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()
rP
A : HashSet internally implements HashMap
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
D : None
in
B : The info attribute is used by JSP container for optimization of generated servlet code.
D : None
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?
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
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
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
D : Type 4 only
in
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
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
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
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
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?
B : getConnection(String url)
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
DF
A : URL rewriting
B : History
C : Cookies
rP
D : SSL sessions
B : ParameterizedStatement
as
D : Executable Statement
M
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
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(…),…
DF
A : java compiler
B : Java API
C : Java interpreter
rP
D : Both A and B
B : FALSE
as
C:
D:
M
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()
B : 4 MB
as
C : 4 bytes
D : 40 KB
M
A : isAlive()
in
B : run ()
C : alive ()
ed
D : keepAlive()
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:
DF
A : Execute
B : executeQuery()
C : executeUpdate()
rP
D : executeResult()
A : 10
te
B : 12
as
C:5
D:8
M
D : Both 1 and 2
ed
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
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
Ed
C : ODBC written in C++ 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
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 ()
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
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
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
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
A : 12885
in
B : 12845
C : 58881
ed
D : 54881
B : The info attribute is used by JSP container for optimization of generated servlet code.
re
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.
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
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
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
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
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
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()
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.
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
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?
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()
A : wait()
in
B : notify()
C : notifyAll()
ed
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
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
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()
B : Initiated
as
C : Prepared
D : Invoked
M
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
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
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.
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
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?
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
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
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
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
Ed
A : HTML tags
B : JSP tags
C : Both 1 & 2
DF
D : Notag
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
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
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?
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
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
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
C : Both 1 & 2
D : PageAttribute
M
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.
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
A : abcdef
te
B : defabc
as
C : abcabc
D : defdef
M
A : 12
B : 16
in
C:1
D : 10
ed
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
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
A : 10
DF
B : 12
C:5
rP
D:8
C:
D:
ed
A : Tuple
at
B : Value
C : Object
re
D : Result
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
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.
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
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?
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
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?
DF
C : The JDBC-ODBC bridge
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
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
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
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
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
rP
A : javax.servlet.jsp.PrintWriter
B : javax.servlet.jsp.SessionWriter
C : javax.servlet.jsp.SessionPrinter
te
D : javax.servlet.jsp.JspWriter
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
D : By setting the autoCommit property of the Connection to false, and execute a statement in the
database
re
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
Ed
A : Established the connection with database
C : Register a driver
DF
D : none of these
rP
A : Column Header
B : First Record
C : Last Record
te
D : Middle Record
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.
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
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
DF
C : Native-API, partly Java 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?
D : Type 4 only
B : The info attribute is used by JSP container for optimization of generated servlet code.
at
D : None
re
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
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
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
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
Ed
A : Process based
B : 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.
A : wait()
B : notify()
M
C : notifyAll()
A : java compiler
ed
B : Java API
C : Java interpreter
at
D : Both A and B
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
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
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
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?
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
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
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
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
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
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
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?
D : Thin driver
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?
rP
C : HashMap is the interface; HashSet 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
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
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:
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
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.
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
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
Ed
A : Established the connection with database
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
Q.no 50. Which attribute specifies a JSP page that should process any exceptions thrown but not
caught in the current page?
ed
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
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
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
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
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
r
A : Call method execute() on a CallableStatement object
i to
B : Call method executeProcedure() on a Statement 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
A : next()
te
B : move()
C : shuffle()
as
D : hasNext()
D : Both 2 and 3
ed
A : <%– –%>
at
B : <%– %>
D : <% &&&%>
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
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
A : html
M
B : jsp
C : javascript
in
D : css
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
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
rP
A : Calling SetPriority() method on a Thread object
C:
D:
in
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
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
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
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()
rP
A : HTML tags
B : JSP tags
C : Both 1 & 2
te
D : Notag
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
A : Declaration
ed
B : Scriptlet
C : Expression
at
D : Comment
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
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
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?
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 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?
rP
B : The info attribute is used by JSP container for optimization of generated servlet code.
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?
rP
B : Both Type 1 and Type 3
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
B : Type 2 only
M
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
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
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
D : Executable Statement
DF
Q.no 3. What requires less resources?
A : Thread
rP
B : Process
A : static attributes
as
B : local attributes
C : dynamic attributes
M
D : global attributes
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?
rP
C : Java server program
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
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
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)
Q.no 14. Which two interfaces does the javax.servlet.jsp package have?
te
A : Page
B : HttpJspPage
as
C : JspriWter
D : PageContext
M
A : Start ()
in
B: Run ()
C : Execute ()
ed
D: Launch ()
A : URL rewriting
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
r
A : Thread(Runnable a, String str)
i to
B : Thread(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 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
Ed
D : Java API Bridge
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 : 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
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
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
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
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?
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.
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
A : Tomcat
B : Weblogic
C : JBoss
in
D : Both 2 and 3
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
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
DF
A : DriverManager
B : JDBC driver
C : Connection
rP
D : Statement
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
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.
A : Process based
B : Thread based
re
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
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
A : javax.servlet.ServletContext
in
B : javax.servlet.ServletConfig
C : javax.servlet.jsp.PageContext
ed
D : javax.servlet.Application
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
r
A : List
i to
B : Queue
C : Set
Ed
D : Collection
Q.no 12. Why will you set auto commit mode to false?
DF
B : To maintain the integrity of business process
rP
D : Does all mentioned
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.
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 : 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?
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
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
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
D : By setting the autoCommit property of the Connection to false, and execute a statement in the
re
database
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 40. Which of these method wakes up the first thread that called wait()?
ed
A : wait()
B : notify()
at
C : start()
D : notifyAll()
re
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
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
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
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?
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
B : The info attribute is used by JSP container for optimization of generated servlet code.
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
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 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
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(…),…
A : URL rewriting
C : SSL sessions
D : Cookies
ed
B : The service() method checks the HTTP request type as GET and calls doGet() method.
C : Both of above
re
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
Ed
C : None of them will be executed
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
A : TRUE
te
B : FALSE
as
C:
D:
M
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
A : Executed
DF
B : Initiated
C : Prepared
rP
D : Invoked
A : HashMap
B : TreeMap
in
C : LinkedHashMap
D : Set
ed
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
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
C : Thin driver
in
D : Both 2& 3
Q.no 25. Which class has traditionally been the backbone of the JDBC architecture?
ed
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:
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
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?
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
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
A : javax.servlet.jsp.PrintWriter
in
B : javax.servlet.jsp.SessionWriter
C : javax.servlet.jsp.SessionPrinter
ed
D : javax.servlet.jsp.JspWriter
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
Q.no 44. Which attribute specifies a JSP page that should process any exceptions thrown but not
caught in the current page?
C : Both 1 & 2
ed
D : PageAttribute
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
DF
A : DatabaseDetails
B : DatabaseServerData
rP
C : DatabaseRawData
D : DatabaseMetaData
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
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
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.
D : None
A : TRUE
B : FALSE
ed
C:
D:
at
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
rP
C : Both of the above.
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
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