Class Test-2 AJP QB
Class Test-2 AJP QB
Class Test-2 AJP QB
AJP
1. Which of these is a not a factory method of InetAddress class?
5. Which class defines following methods? int getContentLength() long getDate( ) long getExpiration()
(a) URLConnection
(b) Datagram
(c) Client
(d) None of these
6. Name the class which is used to create a port where the server will listen?
(a) Server
(b) Socket
(c) ServerSocket
(d) SocketServer
7. class Permission in java.security package is .
(a) static
(b) abstract
(c) final
(d) None of these
8. The class is used to create TCP server.
(a) Server
(b) SocketServer
(c) ServerSocket
(d) Socket
9. Which is the correct syntax for getLocalHost( ) method?
13. Which of the following method is used for send SQL statements?
(a) Statement (b) Callable Statement (c) Prepared Statement (d) Both B & C
20. How many steps are used to connect java application with the database using JDBC?
(a) 5 (b) 4 (c) 3 (d) 6
22. Which kind of driver converts JDBC calls into calls on the Client API for Oracle,
Sybase,
Informix, IBM DB2, or other DBMS
(a) JDBC ODBC bridge + ODBC Driver
(b) Native API partly – Java Driver
(c) JDBC – Net pure Java Driver
(d) Native Protocol Pure Java Driver
23. Which method executes an SQL statement that may return multiple results?
(a) executeUpdate( )
(b) executeQuery( )
(c) execute( )
(d) noExecute( )
26. is a small piece of information that is passed back & forth in HTTP request
&response.
(a)Servlet (b) Applet (c) Cookie (d) Session
28. A user types the URL http://www.msbte.com/result.php. Which request gets generated?
(a) GETmethod (b) POST method (c)Head method (d) PUT method.
29.ApacheTomcat is .
(a) Servlet
(b) Java Program
(c) API
(d) Webserver capable of running Java programs
33. To send binary output in the response, the following method of HttpServlet response
many be used to get the appropriate Writer/Stream object.
(a) getStream()
(b) getOutputStream()
(c) getBianaryStream( )
(d) getWriter( )
34. is the first Phase of Servlet Life cycle.
(a) service()
(b) init()
(c) destroy()
(d) Both B & C
36. Which method is used to specify before any lines that used the PrintWriter?
(a) setPageType( ) (b) setContextType( ) (c) setContentType( ) (d) setResponseType( )
38. The following methods belongs to the life cycle methods of the servlet.
(a) init( ) (b) service( ) (c) destroy( ) (d) All of the above
D. Servlets execute within the address space of web server, platform independent and
uses thefunctionality of java class libraries