AJP MCQ
AJP MCQ
Q. 2 Which is the container that contain title bar and can have
MenuBars. It can have other components
like button, textfield etc.?
(a) Panel (b) Frame
(c) Window (d) Container
Answer: b
Q. 6 These two ways are used to create a Frame By creating the object
of Frame class (association) By
extending Frame class (inheritance)
(a) True
(b) False
Answer:a
Q. 8 How many types of controls does AWT supports these controls are
subclasses of component?
(a) 7
(b) 6
(c) 5
(d) 8
Answer:a
Q. 20. Which of the following is true about AWT and Swing components?
(a) AWT components creates a process where as swing components
creates a thread
(b) AWT components creates a thread whereas swing components creates
a process
(c) Both AWT and Swing components creates a process
(d) Both AWT and swing components creates a thread
Answer: c
Q. 21 Panel is defined as .
(a) The Panel class is a concrete subclass of Container.
(b) A Panel is a window that does not contain titlebar, menubar and
border.
(c) Panel is a superclass of Applet.
(d) All of the above.
Answer: d
Q. 35 What is API?
(a) Application Programming Interchange
(b) Application Programming Interaction
(c) Application Programming Interface
(d) None of these
Answer: c
01 – Abstract Windowing Toolkit (AWT)
Q. 36 Panel is defined as .
(a) Panel class is a concrete sub‐class of container
(b) A Panel is a window that does not contain a title bar, menu bar
or border
(c) Panel is the superclass of Applet
(d) All of above
Answer: d
Chapter 2 : Swings
02 – Swings
Q. 7 MVC architecture is
(a) Modelling – Visual – Controller
(b) Model – View – Controller
(c) Model – Viewable – Controller
(d) Many – View – Controller
Answer: b
Q. 25. The scroll bar constants for scroll pane are defined in
a) Scrollbar class
02 – Swings
b) ScrollPane class
c) ScrollPaneConstants interface
d) Component class
Answer: c
Q. 18 ActionEvent is applied on
(a) Frame
(b) Checkbox, Choice, List
(c) Scrollbar
(d) Button, TextField, List, Menu
Answer: d
Q. 2 Name the class which is used to create a port where the server
will listen.
(a) Server
(b) Socket
(c) ServerSocket
(d) SocketServer
Answer: b
Q. 7 IPv6 uses .
(a) 4 groups of 8 bits each
(b) 4 group of 8 hexa‐decimal digits
(c) 8 groups of 4 digits each
(d) 8 groups of 4 hexa‐decimal digits each
Answer: d
Answer: a
Q. 19 What value is returned by the readLine( ) method when it reach
at End of File?
(a) EOF
(b) null
(c) 0
(d) END
Answer: b
Q. 34 Name the class which is used to create a port where the server
will listen?
(a) Server
(b) Socket
(c) ServerSocket
(d) SocketServer
Answer: b
04 – Networking Basics
Q. 3 In JDBC imports all Java classes that are concern with Database
connectivity.
(a) javax.sql
(b) java.mysql
(c) java.sql
(d) com.sql
Answer: c
Q. 15 How many steps are used to connect any java application with
the database using JDBC ?
(a) 5
(b) 4
(c) 3
(d) 6
Answer: a
06 – Servlets Marks:-14
Content of Chapter:-
6.1 Servlet Type of Servlet, Servlet life cycle
6.2 Creating Simple Servlet: The Servlet API, javax.servlet Package,
Servlet Interface, Servlet
Config Interface, ServletContext
Interface,ServletRequest ,ServletResponse,GenericServlet
Class
6.3 The Javax,servlet.httppPackage:HttpServletRequest Interface,
HttpServletResponse
Interface, HttpSession Interface, Cookie Class, HttpServlet
Class,HttpSessionEvent Class,
HttpSessionBindingEvent Class
6.4 Handling Http Request and Responses, Handling HTTP GETRequest,
Handling Http POSTRequest
6.5 Cookies and Session Tracking
Chapter 6 : Servlets
06 – Servlets
Q. 1 JSP embeds in .
(a) doGet( )
(b) doPost( )
(c) doTrace( )
(d) doPut( )
Answer: a
Answer: d
Answer: b
Answer: b
Answer: b
(a)
(b)
(c)
(d)
Answer: b
time_in_minutes
time_in_minutes
time_in_minutes
Answer: b
(c) appends the request and response objects to the current servlet.
Answer: c
Answer: a
(a) Servlet
(b) Applet
(c) Cookie
(d) Session
Answer: c
(a) start( )
(b) init( )
(c) service( )
(d) destroy( )
Answer: c
Answer: b
Q. 14 Apache Tomcat is .
(a) Servlet
(c) API
Answer: d
(c) Creates new session if, the session does not exist
Answer: c
Answer: b
(a) getStream( )
(b) getOutputStream( )
(c) getBianaryStream( )
(d) getWriter( )
Answer: b
(a) service( )
(b) init( )
(c) destroy( )
Answer: b
(a) 1
(b) 2
(c) 3
(d) Unlimited
Answer: a
Q. 21 Which method is used to specify before any lines that used the
PrintWriter?
(a) setPageType( )
(b) setContextType( )
(c) setContentType( )
(d) setResponseType( )
Answer: c
(a) ServletResponse
(b) ServletRequest
(c) Servlet
(d) ServletConfig
Answer: b
(a) init( )
(b) service( )
(c) destroy( )
Answer: d
Q. 24 Java servlet
Answer: d
(a) Two
(b) Three
(c) Four
(d) Five
Answer: b
(a) Two
(b) Three
(c) Four
(d) Five
Answer: d
Answer: a
Answer: d
Q. 29 JSP stands for .
Answer: c
Answer: c