Вы находитесь на странице: 1из 19

Question: 1

Which of the following is a challenge in a J2EE?


(A) Fault tolerance

(B) Durability

(C) Scalability

(D) Reliability
View Answer
Ans: D

Reliability

Question: 2

Which of the following is not a J2EE client?


(A) Web applications

(B) Applets

(C) Java Web Start clients

(D) JSP
View Answer
Ans: D

JSP

Question: 3

Which of the following is not a web centric component?


(A) Applets

(B) Web Services


(C) Servlets

(D) Java Server Pages


View Answer
Ans: A

Applets

Question: 4

Which of the following is not a reserved word?


(A) while

(B) goto

(C) if

(D) then
View Answer
Ans: D

then

Question: 5

Which one of the following that controls communication


between tiers in J2EE multi tiers architecture?
(A) API

(B) ACL

(C) JDBC

(D) RMI
View Answer
Ans: B
ACL

Question: 6

How can a servlet call a JSP error page?


(A) This capability is not supported

(B) When the servlet throws the exception, it will automatically be caught by the calling
JSP page

(C) The servlet needs to forward the request to the specific error page URL. The
exception is passed along as an attribute named “javax.servlet.jsp.jspException”

(D) The servlet needs to redirect the response to the specific error page, saving the
exception off in a cookie
View Answer
Ans: C

The servlet needs to forward the request to the specific error page URL. The exception
is passed along as an attribute named “javax.servlet.jsp.jspException”

Question: 7

Which of the following act as an interface between a


component and the low level platform?
(A) Session Bean

(B) Entity Bean

(C) Container

(D) Applets
View Answer
Ans: C

Container
Question: 8

Which of the following is not a feature of Message Driven


Bean?
(A) It has no client visibility

(B) The container cannot pool instances

(C) It does not have a local or remote interface

(D) It is invoked asynchronously by the container


View Answer
Ans: B

The container cannot pool instances

Question: 9

A JMS message producer is created by


(A) session

(B) connection

(C) destination

(D) industry
View Answer
Ans: A

session

Question: 10

Which technology provides the flexibility to swap between


XML processors with no application code changes?
(A) JAAS
(B) SAX

(C) XSLT

(D) JAXP
View Answer
Ans: D

JAXP

Question: 1

Which of the following is/are true about J2EE?


a. J2EE stands for Java 2 Enterprise Edition

b. J2EE is an environment for developing and deploying enterprise applications

c. J2EE specification is defined by Sun Microsystems Inc

d. The J2EE platform is one the best platform for the development and deployment of
enterprise application.

(A) both a and b

(B) both a and c

(C) both a, b and c

(D) all
View Answer
Ans: D

all

Question: 2

Which enterprise bean type is defined without any client


view interfaces?
(A) Message Driven Bean

(B) BMP Entity bean

(C) Stateless Session bean

(D) Stateful Session bean


View Answer
Ans: A

Message Driven Bean

Question: 3

Which of the following modifiers cannot be applied to a


method?
(A) protected

(B) private

(C) public

(D) abstract
View Answer
Ans: D

abstract

Question: 4

Which JDBC driver type is also referred as the java


protocol?
(A) type 1 JDBC to ODBC protocol

(B) type 2 java 1 native code driver

(C) type 3 JDBC driver


(D) type 4 JDBC driver
View Answer
Ans: C

type 3 JDBC driver

Question: 5

Which of the following is not a standard method called as


part of the JSP life cycle?
(A) jspDestroy()

(B) jsp Init()

(C) jspService()

(D) jspservice()
View Answer
Ans: D

jspservice()

Question: 6

Which of the following are J2EE modules?


(A) EJB, Web, Application client and Java servlet

(B) EJB, Web, Application client and Resource adapter

(C) EJB, Web, Applet and Resource adapter

(D) EJB, Web, Application client and Applet


View Answer
Ans: B

EJB, Web, Application client and Resource adapter


Question: 7

Which of the following should NOT be used to share data


between servlets in a distributed web application?
(A) Attributes of ServletContext

(B) Enterprise Java Beans

(C) Attributes of HttpSession

(D) Database
View Answer
Ans: A

Attributes of ServletContext

Question: 8

Which of the following statement is true?


(A) J2EE component is a self-contained functional software unit supported by a
container

(B) J2EE applications modules cannot be deployed as standalone units

(C) Modules cannot be assembled into J2EE applications

(D) J2EE components are written in the C programming language


View Answer
Ans: A

J2EE component is a self-contained functional software unit supported by a container

Question: 9

Which of the following is NOT an advantage of using the


SessionFacade pattern?
(A) Hides model complexity from the client

(B) Reduces network traffic

(C) Provides a simple interface to the client

(D) Enables the client to control transactions


View Answer
Ans: D

Enables the client to control transactions

Question: 10

JDBC driver is loaded by calling which of the following


methods
(A) call() method

(B) class.forName () methods

(C) close () method

(D) connect () methods


View Answer
Ans: B

class.forName () methods

Question: 1

Which of the following file extension does the EJB modules


of the application have?
(A) .xml

(B) .war

(C) .ear
(D) .jar
View Answer
Ans: B

.war

Question: 2

Which one of the following tier in J2EE multi tier architecture


provide internal functionality to J2EE application.
(A) Web Tier

(B) Enterprise Java Beans Tier

(C) Enterprise Interface System Tier

(D) Presentation Tier


View Answer
Ans: A

Web Tier

Question: 3

JMS Publish/Subscribe Messaging Domain is an


(A) one to one relationship between sender and receiver

(B) many to many relationship between sender and receiver

(C) one to many relationship between sender and receiver

(D) many to many relationship between sender and receiver


View Answer
Ans: C

one to many relationship between sender and receiver


Question: 4

Which of the following is a file that describes the style of


elements that appear on the webpage?
(A) cascading strong sheet

(B) controlling style sheet

(C) cascading style sheet

(D) none of the above


View Answer
Ans: C

cascading style sheet

Question: 5

Which of the following are not methods of the


java.lang.string class?
(A) substring

(B) append

(C) replace

(D) concat
View Answer
Ans: B

Append

Question: 1

Choose the statement that best describes the relationship


between JSP and servlets
(A) Servlets are built on JSP semantics and all servlets are compiled to JSP pages for
runtime usage

(B) JSP and sevlets are unrelated technologies

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

(D) JSPs are built on servlet semantics and all JSPs are compiled to servlets for runtime
usage
View Answer
Ans: D

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

Question: 2

Which of the following statements is NOT true about the


Common Client Interface of JCA?
(A) CCI cannot connect to non relational systems

(B) CCI defines a set of interfaces and classes whose methods allow a client to perform
typical data access operations

(C) A resource adapter is not required to provide support for the CCI

(D) CCI can connect to relational database systems


View Answer
Ans: A

CCI cannot connect to non relational systems

Question: 3
Which of the following is not true in JMS point to point
message domain?
(A) There is only one receiver

(B) The receiver can request a message

(C) The receiver must acknowledge the receipt of the message

(D) The receiver does not need to exist when the message is produced
View Answer
Ans: B

The receiver can request a message

Question: 4

What will be the maximum size for a cookie?


(A) 1 KB

(B) 2 KB

(C) 3 KB

(D) 4 KB
View Answer
Ans: D

4 KB

Question: 5

In JAAS, which of the following uses a CallbackHandler


object?
(A) AuthPermission

(B) Policy
(C) Credential

(D) LoginModule
View Answer
Ans: D

LoginModule

Question: 1

Which of the following is not a kind of exception that is


thrown by JDBC method?
(A) SQL Exception

(B) DataRounding

(C) DataTruncation

(D) SQL Warning


View Answer
Ans: B

DataRounding

Question: 2

Which of the following could be written with little knowledge


of java?
(A) Java Server Pages

(B) Java Servlets

(C) Common Gateway Interface

(D) Java Community Program


View Answer
Ans: A

Java Server Pages

Question: 3

Which of the following is a business component in J2EE?


(A) Enterprise Java Beans (EJB)

(B) Java servlet and JSP (Web)

(C) Applets

(D) Application clients


View Answer
Ans: A

Enterprise Java Beans (EJB)

Question: 4

Which of the following is the main drawback of CGI?


(A) Interfacing with corporate infrastructure

(B) Dynamic web pages

(C) Resource Intensive

(D) Scalability
View Answer
Ans: D

Scalability

Question: 5
Which of the following modifiers can be applied to a
constructor?
(A) volatile

(B) final

(C) private

(D) abstract
View Answer
Ans: C

Private

ENTERPRISE JAVA MCQS WITH ANSWER AND


EXPLANATION
Enterprise Java Questions and Answers Set 1
Set 1           Set 2           Set 3

1. Which of the following is the format for EJB deployment descriptor


files?   

(a) XML 
(b) XSL
(c) HTML
(d) Java
(e) DHTML.

2. EJB is a        

(a) Middleware
(b) Scalable component architecture
(c) Component architecture to integrate legacy systems
(d) Component architecture to encapsulate business logic
(e) All of the above.

3. Which of the following EJB has no state?     

i. Message-Driven Bean. 
ii. BMP Entity Bean.
iii. Stateless Session Bean.
iv. Stateful Session Bean.

(a) Both (I) and (II) above 


(b) Both (II) and (III) above 
(c) Both (III) and (IV) above 
(d) Both (I) and (IV) above 
(e) Both (I) and (III) above.

4. Which of the following is true for EJB?    

(a) EJB is server-side component architecture for distributed applications in Java


(b) EJB facilitates scalable, secure and transaction-oriented applications
(c) EJB supports portability and reusability
(d) EJB specification allows different vendor implementation of it
(e) All of the above.

5. Which of the following EJB type has no Remote interfaces?   

(a) Message-Driven Bean


(b) BMP Entity Bean
(c) CMP Entity Bean
(d) Session Bean
(e) Sessionless Bean.

6. Which role in EJB architecture is responsible for EJB Server?    

(a) EJB Deployer


(b) Application Assembler
(c) Network Engineer
(d) Server Provider
(e) Tool Vendor.
7. Which of the EJB has a passive state in its life cycle?                                  

I. Stateless Session Bean.


II. Message-Driven Bean. 
III. BMP Entity Bean.

(a) Only (I) above 


(b) Only (II) above 
(c) Only (III) above
(d) Both (I) and (II) above
(e) Both (II) and (III) above.

8. Which part of multi-tier enterprise application contains EJB


component?     

(a) Application Server


(b) Web Server
(c) Database Server
(d) Fat Client
(e) Thin Client.

9. Which of the following distributed object technology is/are not


included in Java? 

I. CORBA.
II. DCOM.  
III. RMI.
IV.  EJB.

(a) Only (I) above 


(b) Only (II) above 
(c) Only (III) above 
(d) Only (IV) above
(e) All (I), (II), (III) and (IV) above.

10. Which of the following is not a property of EJB transaction? 

(a) Atomicity 
(b) Consistency 
(c) Isolation
(d) Distributed
(e) Durability.

Вам также может понравиться