1. It is lightweight.It supports pluggable look and feel.It follows MVC (Model View Controller) architecture. The following specifies the advantages of
Correct : A. Swing
2. Swing is not a part of JFC (Java Foundation Classes) that is used to create GUI application?
Correct : A. True
3. Which class provides many methods for graphics programming?
Correct : C. java.awt.Graphics
4. Implement the Listener interface and overrides its methods. Register the component with the Listener The Following steps are required to perform
Correct : C. Event Handling
5. The ActionListener interface is not used for handling action events?
Correct : B. False
6. The ActionListener interface is used for handling action events,Forexample,it's used by a
Correct : D. All of these
7. JFramemyFrame = new JFrame (); Any command (such as the one listed above) which creates a new object of a specific class (in this case a new JFrame object called myFrame) is generally called a ...
Correct : A. Constructor
8. MVC Architecture stands for
Correct : A. . Model View Controller
9. Which is the container that doesn't contain title bar and MenuBars but it can have other
components like button, textfieldetc?
Correct : C. Panel
10. Which is the passive control that do not support any interaction with the user?
Correct : B. JLabel
11. . Component used for displaying data in tabular
Correct : C. JTable
12. Java Bean is a _____________ technology
Correct : A. Component
13. Manifest file is a special file that contains information about the files packed in
Correct : A. JAR file
14. Which of the following is not true about Java beans?
Correct : B. Extends java.io.Serializable class
15. Which file separator should be used by MANIFEST file?
Correct : A. /
16. Which of the following is correct error when loading JAR file with duplicate name?
Correct : C. java.lang.ClassFormatError
17. Java Beans are extremely secured?
Correct : B. False
18. Which of the following is not a feature of Beans?
Correct : D. Serialization
19. Which services are provided to EJB components by the EJB container?
Correct : D. All mentioned above
20. Which case of a session bean obtains the UserTransaction object via the EJBContext using the getUserTransaction() method in EJB transaction management?
Correct : A. Bean-managed transactions
21. EJB QL is a Query Language provided for navigation across a network of enterprise beans and dependent objects defined by means of container managed persistence.
Correct : A. True
22. A message driven bean is like a stateful session bean that encapsulates the business logic and doesn't maintain state.
Correct : B. False
23. Abbreviate the term JMS?
Correct : A. Java Message Service
24. JMS is mainly used to send and receive message from one application to another.
Correct : A. True
25. Which session bean maintain their state between client invocations but are not required to maintain their state across server crashes or shutdowns?
Correct : C. Singleton Session Bean
26. Which EJB container must provide an implementation of Java Naming and Directory Interface (JNDI) API to provide naming services for EJB clients and components?
Correct : C. Naming support
27. EJB is a specification for J2EE server, not a product; Java beans may be a graphical
component in IDE.
Correct : A. True
28. A session bean represents a multiple clients inside the Application Server.
Correct : B. False
29. Which component does the Entity bean represent the persistent data stored in the
database?
Correct : A. Server-side component
30. EJB is like COM, Abbreviate the term COM?
Correct : A. Component Object Model
31. JMS is also known as a messaging service.
Correct : A. True
32. What represents a persistent global data from the database?
Correct : A. Entity Bean
33. Which component does the Entity bean represents the persistent data stored in the database?
Correct : A. Server-side component
34. In EJB, middleware services are provided by EJB Container automatically.
Correct : A. True
35. Which middleware services are provided by EJB?
Correct : C. Both A & B
36. Which server-side component is required to be deployed on the server?
Correct : A. EJB
37. Which type of instances retain no data or conversational state for a specific client?
Correct : A. Message-Driven Bean
38. EJB technology is built on the top of Socket Programming
Correct : B. False
39. How constructor can be used for a servlet?
Correct : C. Initialization and Constructor function
40. Can servlet class declare constructor with ServletConfig object as an argument?
Correct : B. False
41. Java Servletsare efficient and powerful solution for creating .......................for the web.
Correct : A. dynamic content
42. ..................... is the first phase of the servlet life cycle.
Correct : A. Initialization
43. The service phase of the servlet life cycle represents all interactions with requests until
the servlet is ......................
Correct : D. destroyed
44. GET methods are great for sending ....................amounts of information that you do not mind having visible in a URL.
Correct : C. small
45. Several vendors are adding ...................... to their existing database .................
Correct : D. JDBC drivers, middle-ware products
46. Which of the following code is used to get an attribute in a HTTP Session object in
servlets?
Correct : A. session.getAttribute(String name)
47. A servlet needs to acquire a data source through a JNDI naming lookup. Which of the following is the best place to do this?
Correct : B. init method
48. What's the difference between servlets and applets? a. Servlets executes on Servers, where as
Correct : A. Applets executes on Browser
49. Which of the following code retrieves the body of the request as binary data?
Correct : C. DataInputStream data = request.getInputStream()
50. When destroy() method of a filter is called?
Correct : A. The destroy() method is called only once at the end of the life cycle of a filter
51. Which of the following is true about servlets?
Correct : D. Servlets execute within the address space of web server, platform independent and uses the functionality of java class libraries
52. Which method is used to specify before any lines that uses the PrintWriter?
Correct : C. setContentType()
53. Which of the following are the session tracking techniques?
Correct : B. URL rewriting, using session object, using cookies, using hidden fields
54. The getSession() method with „true‟ as its parameter [ getSession(true) ] it will return the appropriate session object when
Correct : D. the session is existing
55. A servlet maintain session in
Correct : B. Servlet context
56. Servlet mapping defines
Correct : A. an association between a URL pattern and a servlet
57. The life cycle of a servlet is managed by
Correct : B. servlet container
58. The init parameter name and value pairs that are defined in web.xml file are handled by
Correct : A. ServletConfig object
59. How many ServletContext objects are available for an entire web application?
Correct : D. Only one
60. Which of the following package contains servlet classes?
Correct : C. Both of the above
61. Which page directive should be used in JSP to generate a PDF page?
Correct : A. contentType
62. Which tag should be used to pass information from JSP to included JSP?
Correct : A. Using <%jsp:page> tag
63. Application is instance of which class?
Correct : D. javax.servlet.ServletContext
64. _jspService() method of HttpJspPage class should not be overridden.
Correct : A. True
65. Which option is true about session scope?
Correct : B. Objects are accessible only from the pages which are in same session
66. Default value of autoFlush attribute is?
Correct : A. true
67. Which one is the correct order of phases in JSP life cycle?
Correct : C. Compilation, Initialization, Execution, Cleanup
68. “request” is instance of which one of the following classes?
Correct : C. HttpServletRequest
69. Which is not a directive?
Correct : C. export
70. Which is mandatory in tag?
Correct : A. id, class
71. Which one of the following is correct for directive in JSP?
Correct : A. <%@directive%>
72. Which of the following action variable is used to include a file in JSP?
Correct : C. jsp:include
73. Which attribute uniquely identification element?
Correct : A. ID
74. “out” is implicit object of which class?
Correct : D. javax.servlet.jsp.JspWriter
75. Which object stores references to the request and response objects?
Correct : B. pageContext
76. What temporarily redirects response to the browser?
Correct : C. response.sendRedirect(URL)
77. Which tag is used to set a value of a JavaBean?
Correct : A. <c:set>
78. Can <!–comment–> and <%–comment–%> be used alternatively in JSP?
Correct : B. False
79. Java code is embedded under which tag in JSP?
Correct : B. Scriptlet
80. Which of the following is not a directive in JSP?
Correct : D. command directive
81. In RMI Architecture which layer Intercepts method calls made by the client/redirects these calls to a remote RMI service?
Correct : A. Stub & Skeleton Layer
82. Which is an object, acts as a gateway for the client side, all the outgoing requests are routed through it and it resides at the client side and represents the remote object?
Correct : A. Stub
83. Java supports RMI, RMI Stands for?
Correct : C. Remote Method Invocation
84. An RMI Server is responsible for _______
Correct : B. Exporting the remote object
85. Abbreviate the term DGC?
Correct : B. Distributed Garbage Collection
86. RMI and EJB, provides services to access an object running in another JVM (known as remote object).
Correct : A. True
87. In RMI, the objects are passed by _____.
Correct : A. Value
88. RMI uses a layered architecture; each of the layers could be enhanced or replaced without affecting the rest of the system.
Correct : A. True
89. What are the exceptions which have to be handled in a RMI client program?
Correct : D. All mentioned above
90. RMI is a server-side component; It is not required to be deployed on the server.
Correct : B. False
91. Which package is used for Remote Method Invocation (RMI)?
Correct : D. java.rmi
92. Which program obtains a remote reference to one or more remote objects on a server
and then invokes methods on them in an RMI application?
Correct : B. Client
93. Which objects are used by RMI for communicating with the remote object?
Correct : C. Both A & B
94. RMI Architecture consists of how many layers?
Correct : C. 4
95. Which method in naming class specifies a name to the remote object?
Correct : A. bind(string name)
96. 1099 is the default port used by RMI Registry.
Correct : A. True
97. RMI uses which protocol on top of TCP/IP (an analogy is HTTP over TCP/IP)?
Correct : A. Java Remote Method Protocol (JRMP)
98. Which method of the Naming class (found in java.rmi) is used to update the RMI
registry on the server machine?
Correct : A. rebind ()
99. What is the built on top of the socket programming?
Correct : B. RMI
100. In RMI which layer defines and supports the invocation semantics of the RMI connection and this layer maintains the session during the method call?