PRJ321-New

Ace your homework & exams now with Quizwiz!

13. A discovery file used to locate Web Services would have which extension?

.vdisco

107. The Web component has file with ______ extension. [0.5]

.war

105. The J2EE application deployment descriptor has file with _____ extension. [0.5]

.xml

In what directory shouldn?t you place tag files?

/WEB-INF/

default String s ,, abstract double d ,, double hyperbolic

3 dap an

The code on line 33 executes successfully

3.33 throws, 35 throws, 33 executes

An exception is thrown at runtime

An exception

What are call back methods?

Container calling methods of bean

The __________ meets the low-level run time execution environment required by EJB applications.

Container provider

CMP applications are completely portable.

False

Session beans have a primary key

False

The bean class is different from a Java class

False

The bean class is different from a Java class.

False

The client creates and destroys the bean

False

The client creates and destroys the bean.

False

The client side id more complex than server side

False

When implementing a tag...BodyTagSupport class. Is this statement true of false

False

XML documents can be formatted using text editors.

False

18. Which interface isn't inherited from Collection interface ?

Map

A bean communicates with the outside world through events, generated when the internal state of the bean changes

True

Attribute type can be defined within the individual 'element'.

True

Boxes can be overlapped using the z-index property.

True

CMP's are preferred to BMP's in legacy systems.

True

CMP?s are preferred to BMP?s in legacy systems.

True

Can a transactional context be propagated from client

True

Can a transactional context be propagated from client? Comment

True

If an application supports DOM it is irrelevant whether the program is written in VB or C.

True

If you want the same servlet to handle both GET and POST and to ....

True

In DOM, it is not necessary that an object for a valid node type will always be returned.

True

In JSP model I architecture the presentation logic is taken care by JSPs.

True

Is APIs a Contracts type

True

It is possible to have a property with multiple values

True

JSPs can be deployed on a Web Logic Server.

True

JavaServer Pages (JSP) technology enables you to mix regular, static HTML with dynamically generated content from servlets. You simply write the regular HTML in the normal manner, using familiar Web-page-building tools

True

Standard call back methods to manage an entity bean are a must.

True

Stateful session beans tend to be specific to one scenario. Do you agree with this statement?

True

StringBuffer is slower than a StringBuilder, but a StringBuffer

True

Suppose there are 100 employee details entity beans then there will be 100 unique IDs.

True

Swing components can?t be combine with AWT

True

The 'readyState' property in the DOMDocument Object defines several states that specify the current status of the asynchronous download.

True

The 'xml' property always returns a UNICODE string.

True

The EJB context needs to be queried during security authorization

True

The EJB context needs to be queried during security authorization.

True

The arguments and return type for each method should be serializable

True

The data type date time is written as a String

True

The default value of the order attribute depends on the value of the content attribute.

True

The deployment descriptor is essentially a file

True

The logical structure of XML can be manipulated by XSL

True

The method body of a callback method can be left blank in the bean class.

True

The middleware services are transaction-monitoring services

True

The passivation process is the opposite of the activation process

True

The passivation process is the opposite of the activation process.

True

The root nodes can make multiple appearances in the document.

True

The value of the CSS styling property can be a color value.

True

Transactions are useful for performing persistent operations

True

Transactions are useful for performing persistent operations.

True

XML Schema supports richer data types

True

XML inherited the concepts of DTDs from SGML.

True

XML vocabulary is used for specifying formatting semantics.

True

XSLT and CSS are compatible standards.

True

Xml property of the XMLDOMNode object is a read only property.

True

be 100 unique IDs.

True

Cookies never expire

a. False

Which two are true if a NullPointerException is thrown on line 3 of class C

code on line 29, The exception

The developer needs to be concemed about the OTS

false

Identify the valid font properties and font related options are:

font-variant && font-family

ejbCreate() method of entuty bean class returns ________________

primary key

9. Which method is not defined in Math class ?

println()

you are writing a class that will provide custom deserialization. The class implements java.io.Serializable (not java.io.Externalizable)

private

The __________ is responsible for unicast point-to-point invocation.

remote reference layer

The RMI defines the difference between _______ and _____ objects.

remote/local

The RMI defines the difference between remote and local objects.

remote/local

The RMO defines the difference between __ and __ object

remote/local

109. The ___ method is used to delete an entity bean from presistent store

remove()

The returned value varies depending on the argument

returns 0

10.private int itemld;11.private String name;12.private String description;

setItemld(int itemld)

Which method signature follows the JavaBeans naming standards for modifying the itemld instance variable?

setItemld(int itemld)

The _________ method is used to specify different life spans for a cookie.

setMaxAge(int seconds)

XSL uses XSLT to transform an XML ____________ into an XML _______________.

source tree // result tree

Normally for enclosing a generic term when defining code we use

square brackets

Which is method declared in Runnable method ?

start()

client interaction to entity beans is

synchronous

All immediate child elements of the SOAP Header element MUST be namespace-qualified.

t

'eltOnly' indicates:

the element type can contain only the declared child elements

BigOlLongStringWithMeaninglessName

tick all

import java.io.Serializable;public class MyegPK implements java.io.Serializable

valid

The output: value is 99.99

value is 9.0

11. To which namespace does the Activator class belong?

ystem

The home interface can have __________________________ create method/s and ___________________________ find method/s.

zero or more/one or more

12. What is the SQL wildcard character?

%

25. Which character is not a special character in regular expression.

'@'

Entity beans contain ____________, which is very different from what session beans contain.

--container?managed persistence

Managing threads

--remote instance

Authentication is specified in .....

--web.xml

What is -50 >> 2

-13

range of values that can be assigned to a variable of type short

-215 through 215 - 1

What is -50 >> 1

-25

What is -8 % 5

-3

What is -15 % -10

-5

# See the extract from web.xml below: <servlet-mapping> <servlet-name>ServletA</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>ServletB</servlet-name> <url-pattern>/bservlet.html</url-pattern> </servlet-mapping> <servlet-mapping>

. Servlet A

100. The Java Application has _____ file extension. [0.5]

.class

109. The final J2EE application is a ______ file [0.5]

.ear

106. The Enterprise bean is a file with _____ extension. [0.5]

.xml

Name the location of compiled class files within a war file?

/WEB-INF/classes

Which of the following direcrories are legal locations for the deployment descriptor file? Note that all paths are shown as from the root of the machine or driver.(Choose one.)

/appserverIntallDirectory/webapps/webappName/WEB-INF/xml

44. The features which most J2EE applications have are ______, _______ [1.5]

a) Database Access b) Transaction Management

8. J2EE stands for ________ [0.5]

a) Java 2 Platform Enterprise Edition

11. How many sqlDataReader objects can be open on one Connection at one time?

1

43. The developer faces _______ problem while developing an enterprise application. [1.5]

a) Programming productivity

37. HTTP, HTTPS, JDBC, JTA are ________technologies. [1.5]

a) Service & Communication

14. The middleware services are transaction-monitoring services. [1.0]

a) True

26. Is APIs a Contracts type [1.0]

a) True

17. Mobiles understand ______ [1.0]

a) WML

40. The J2EE platform provides _______ benefits [1.5]

a) simplified architecture & development

What is the result of attempting to access the following JSP page? <html> <body> <%!public String methodA(){ return methodB();} %> <%!public String methodB(){ return "JAD Final Test"; } %> <h2><%= methodA() %></h2> </body> </html>

a. "JAD Final Test" is output to the resultring web page.

Which two are valid representations of operations in UML? (Choose two.)

a. - op(p : P) : P b. + op(param : int) : int

How many sesssion (Http Serverlet Request) time out mechanisms

a. 3

Which syntax is correct for JSP Declarations :

a. <% code %>

Which of the following correctly represents the following JSP statement. Select the one correct answer

a. <jsp: expression>x</jsp: expression>

_______________ sends a request to an object and includes the result in a JSP file.

a. <jsp:include>

Which of the following lines of code are correct?

a. @Entity public class Employees{..}

Which option can be used to predefine Java Persistence queries for easy use?

a. @NamedQuery annotation

If an HTTP client rrequest is NOT authenticated, what is returned by request.getUserPrincipal()?

a. A null

Which statement about threading in Java is false?

a. A thread is a special type of method.

Which is NOT EJB container?

a. Apache Tomcat 5.5

Select the BEST case to Use Entity Beans? (Choose one)

a. At any given time, only one client has access to the bean instance.

The ________ supplies business components,or enterprise beans

a. Bean provider

Which is NOT Enterprise Beans?

a. Business Beans

Which pattern insulates the presentation client code from volatility in business APIs?(Choose one.)

a. Business Delegate

What is the result?

a. Compilation fails.

Which is disadvantage of using JEE ( or J2EE) server-side technologies in a web-based application?

a. Complexity

A ___________________________ in EJB is an object that is deploy on any EJB Server

a. Component

What request header must be set for parameter data to be decoded from a form? (Choose one.)

a. Content-Type: application /x-www-form-urlencoded

Which Java technology provides a unified interface to multiple naming and directory services?

a. EJB

Which type of JEE (or J2EE) component is used to store business data persistently?

a. Entity Bean

Which is the CORRECT statement?

a. Entity beans represent persistent state objects (things that don't go away when the user goes away).

A session bean being used by a client can also be used by another client.

a. False

A stateful session bean must commit a transaction before a business method

a. False

Action <jsp:include> is evaluated once at page translation time.

a. False

Host names are translated into IP addresses by web servers.

a. False

Message-driven beans do not have any return value

a. False

Swing components can't be combine with AWT

a. False

The special directory /WEB-INF/ class contain JAR files with supporting libraries of code

a. False

The specifications set by EJB need NOT match with those of the component interface.

a. False

The two most common HTTP requests are get and put.

a. False

Which of the following methods can be used to add cookies to a servlet reponse?

a. HttpServletResponse.addCookie(Cookie cookie)

The session time-out value is controlled in which way(s)?

a. Individual Session Setting b. Application Server Global Default d. Web Application Default

Identify correct statement about a WAR file.(Choose one)

a. It contains web components such as servlets as well as EJBs.

Which are EJB containers? (choose three)

a. JBoss b. IBM WebSphere c. BEA's WebLogic

______ is a set of java API for executing SQL statements.

a. JDBC

Message-driven beans are clsses that implement 02 interfaces:

a. Javax.ejb.messageDrivenBean b. Javax.jms.MessagerListener

Class implement FIFO queue

a. Link list

3.ejbStore() c. It will destroy data in the database ejbPostCreate() d. It will update the database

1 ? b, 2 ? c, 3 ? d, 4 ? a

char c = ?\u1234?

1 dap an

dbc.drivers=sun.jdbc.odbc.JdbcOdbcDriver

1 is true, 2 is false

jdbc.drivers=sun.jdbc.odbc.JdbcOdbcDriver The above statement 1load. 2 unload

1 is true, 2 is false

Which services are the container provided?

1,2,3

Match the following 1.Bean provider and deploys them

1-b,2-d,3-a,4-c

Consider the following declarations:

1.

An enum definition should declare that it extends java.lang.Enum

2.contain public, private

What interfaces can be implemented in order to create a class that can be serialized

2.dai nhat, ngan nhat

int x = 6; if (!(x > 3))

2.dai nhat, x = ~x

Which statements about JDBC are NOT true

2.database system, DBMS

String s = ?123456789?; s = (s-?123?).replace(1,3,?24?) - ?89?

2.delete(4,6), delete(2,5).insert( 1, ?24?)

double d = 1.2d5

2.double d = 1.2d, 1.2D

for( int i=0; i< x.length; i++ ) System.out.println(x[i])

2.for(int z : x), dai nhat

int[] ages = { 9, 41, 49 }; int sum = 0

2.i<ages.length, for (int i:ages)

Line 46 will compile if enclosed in a try block, where TestException is caught

2.if the enclosing, is caught

int d = 0XABCD

2.int c = 0xabcd, dai nhat

java -ea test file1 file2

2.java -ea test, dai nhat

command line on a Windows system

2.must contain the statement, the file

Which methods return an enum constant?s name

2.name(), toString()

Test t = (new Base()).new Test(1)

2.new Test(1), new Test(1, 2)

String x = "Hello"; int y = 9; if (x == y)

2.ngan nhat, x=x+y

Suppose class Supe, in package packagea, has a method called doSomething(). Suppose class Subby, in package packageb, overrides doSomething()

2.public, protected

class bbb.Bbb, which extends aaa.AAA, wants to override callMe(). Which access modes for callMe() in aaa.AAA will allow this

2.public, protected

protected double getSalesAmount() { return 1230.45; }

2.public, protected

int[] x = new int[25]

2.x[24]=0, x.length is 25

Rearrange the orderly steps in Object Relational Mapping

2134

What is 7 % -4

3

What is 7 % -4?

3

how many sesssion (http serverlet request) time out mechanisms

3

NUTMEG, CINNAMON, CORIANDER, ROSEMARY

3.Spice sp, Spice, String

Lemon lem = new Lemon(); Citrus cit = new Citrus()

3.cit = lem, cit=(Citrus), lem=(lemon)

int MY_VALUE = 10

3.final, static, public

How many bits does a float contain

32

The Automicity, Consistency, Isolation, Durability represents____

ACID

Transactions should ideally have____

ACID properties

The person deploying the bean specifies the __ for that bean for better__

ACL?s/security

The JSP document syntax provides replacements <isp:include ...> with __

<jsp:directive.include>

The JSP document systax provides replacements <jsp:include?> with <jsp:directive.include?../>

<jsp:directive.include?../>

The JSP document syntax provides replacements <jsp:include ...> with <>

<jsp:directiveinclude ..../>

A bean with a property color is loaded using the following statement

<jsp:setProperty name="fruit" property="color" value="white"/>

Which deployment descriptor element is used to specify a ServletContext-Listener?

<listener>

Given a tag declared ... "mytags." (Choose three.)

<mytags:book isbn="${isbn}" />+<mytags:book isbn="1861979258" /> +<mytags:book isbn="${isbn}">Some default text if book not found</mytags: book>

What are the don'ts while using stateful session beans?

Always keep the conversation long.

passed An AssertionException is thrown without the word ?stuff? added to the stack trace

An AssertionError...with the

Prefix is:

An alias selected by a document author

Select the correct JMS programming model

a. Locate the JMS Driver ->Create a JMS connection ->Create a JMS session ->Create a JMS producer or a JMS consumer -> Send or receive message

Which statement is correct about Message-Driven Beans?(Choose one)

a. Message-Driven Beans stateless

A ____ dialogs prevent user input in the other windows in the application unit dialog is close

a. Modal

Which of the patterns below will defi nitely reduce the lines of code in an application? (Choose one.)

a. None of the above

Which component can use a container-managed entity manager with an extended persistent context?

a. Only stateful session beans

Which HTTP method is used in FORM based Authentication?

a. POST

Which is NOT a basic messaging model in message dreiven bean?

a. Place-to-place

Which act as a proxy to an EJB?

a. Remote instance

Create() method of entity home interface returns ________

a. Remote object

Every method of the remote interface must throw a ___________________

a. RemoteException

Which interface you CANNOT use to obtain a RequestDispatcher Object?

a. ServletContext

A ____________ is a group of operations, which appear as one large operation during execution.

a. Transaction

GET requests and POST requests can both be used to send form data to a web server.

a. True

Message-Driven Bean does not have a home interface, local home interface, remote interface, or a local interface.

a. True

Objects with application scope are part of a particular Web application.

a. True

Servlet methods are executed automatically.

a. True

The HttpSession method getAttribute returns the object associated with a particular name.

a. True

The path in a URL typically specifies a resource's exact location on the server.

a. True

The properties that characterize transactions are known as ACID properties.

a. True

http Sesision object live on the server

a. True

JDBC supports ______ and ______ models.

a. Two-tier and three-tier

What?s directory of a Web Application that developer must copy *.class?

a. WEB-INF/classes

Under what circumstances will a servlet instance's destroy() method never be called? (Choose two.)

a. When init() has not run to completion successfully b. After destroy() has already been called

Deployment properties are stored in a _______________________ file.

a. XML

Which is NOT provided by the EJB tier in a multitier JEE (J2EE) application?

a. XML Parsing

Entity bean is ______

a. a persistent data component

Which is NOT a scope of implicit objects of JSP file?

a. application

Choose three correct statements in JDBC

a. getObject b. getText c. getInt d. getString

A web application is located in "helloapp" directory. Which directory should it's deployment descriptor be in?

a. helloapp/WEB-INF

___________________ includes a static file in a JSP file, parsing the file's JSP elements

a. include directive

Message-driven beans are classes that implement 2 interfaces :

a. javax.ejb.MessageDrivenBean b. javax.jms.MessageListener

Session bean implements ___ interface.

a. javax.ejb.SessionBean

Which statement is true about EJB 3.0 containers?

a. javax.naming.initialContext is guaranteed to provide a JNDI name space

________ is the well-known host name that refers to your own computer.

a. localhost

create() method of entity home interface returns _________

a. null

Name the default value of the scope atribute of <jsp:usebean>.

a. page

ejbCreate() method of entity bean class returns ______

a. primary key

JavaBeans component has the following field:

a. public void set Enabled(boolean enabled) public boolean getEnabled()

Which is NOT a core component of JSP?

a. scriptlets

A custom tag can be nested inside another custom tag.

a. true

Authentication is specified in .....

a. web.config

The JVM runs until there is only one non-daemon thread

are no non-daemon

6. To debug an ASP.NET application, you need to attach to which process?

aspnet_wp.exe

8. What sentence best describes loosely coupled components?

asynchronous

The 'attribute' element declares a/an __________ for an element type.

attribute

No output because of compile error at line: System.out.println("b="+b)

b = b * b1

8. Given the following java code fragment . Choose invalid code line. Integer a = new Integer(10); int b = 10;

b = null;

The output: b contains 250

b contains 5

6. The Atomicity, Consistency, Isolation, Durability represents ______ property.

b) ACID

19. Transactions should ideally have _________ [1.0]

b) ACID properties

23. EJB stands for ______ [1.0]

b) Enterprise JavaBeans

12. J2EE is platform-dependent [0.5]

b) False

3. J2EE is a kind of Technology [0.5]

b) False

35. The advent of B2B led to __________ [1.5]

b) Inter- organization communication

1. Business logic is placed in _________ [0.5]

b) Middle-tier

#URL referring to databases use the form:

b)jdbc:odbc:datasoursename

Can we use the annotation @PrePassivate for more than one method in a Entity bean?

b. No

Which is true about JDBC?

b. The JDBC API is included in J2SE

The finder method in home interface of EJB must start with ?

b. ejbFindBy

What should be the value of <body-content> subelement of element <tag> in a TLD file if the tag should not have any contents as its body?

b. empty

2 Which methods return an enum constant's name?

b. toString()//c. name()

SOAP messages may

be bound with HTTP as underlying protocol.

3. Which XML rule does the following break? <employees> <Employee> <name>Kenneth S. Lind</name> </Employee> <employee> <name>Marj Rempel </employee> </employees>

be matching opening and closing tags.

which satatement is true about both stateless session beans about bean instances

bean instances are NOT require to survive container crashes

59. The presentation layer is partitioned into _______ and ______. [0.5]

client tier // d) Server side tier

The access control does not take care of

client's identities

collie

collie harrier

73. Different types of n-tier systems are : [1.0]

component

Once the bean instance is associate with the ejb Object the ___ is called

ejsPostCreate()

Servlets generally use ServletOutputStream to write text data to the response

false

Compilation of class A will fail. Compilation of class B will succeed

B fail, A succeed

force garbage collection by calling System.gc().

B. False

What are different between bean managed persistent (BMP) and container managed persistence (CMP)?

BMP offers a lot more flexibility than CMP

In ejb-jar.xml file. <persistence-type> element value is ________________

Bean or Container

The _________________ supplies business components, of enterprise beans

Bean provider

133. The container may not call the ejbRemove() method. Why?

Becase of a container crash

Study the statements:1) URL rewriting may be used when a browser is disabled cookies. 2) In URL encoding the session id is included as part of the URL.

Both 1 and 2 are true

101. The statement javax.ejb.Enterprisebean extends java.io.Serializable signifiles:

Both a and b

The statement javax.ejb.Enterprisebean extends java.io.Serializable signifies:

Both a and b

The getStringException() method throws SQLException when a database access error occurs

false

an object with page scope exists in every jsp of a particular web app

false

139. The client creates and destroys the bean

false;

In order for objects in a List to be sorted, those objects must implement which interface and method

Comparable...compareTo

14. What control is used to validate that two fields are equal?

CompareValidator

An exception is thrown at runtime

Compilation fails

NullPointerException

Compilation fails

The value of all four objects prints in natural order

Compilation fails...line 29

How do the imports affect the time required to compile the source file

Compilation takes slightly more time

66. Containers provides run time environment for ______. [0.5]

Components

80. The three main units of J2EE are: [1.0]

Components Containers Connectors

116. Deploying an application involves two tasks : (choose two) [1.0]

Configuration

The features which most J2EE applications have are

Database Access;Transaction Management

Components are automatically listed in Declarative transactions.

Declarative

Components are automatically listed in ________________________ transactions.

Declarative

Components are automatically listed in__transactions

Declarative

How many way do the security mechanism is implemented?

Declarative and Programmatically

The two ways of performing authorization are Declarative and programmatic.

Declarative/programmatic

The two ways of performing authorization are__and__

Declarative/programmatic

Assertions are used to enforce all but which

Exceptions

82. T<?xml version="1.0"?><script><![CDATA[function matchwo(a,b){if (a < b && a < 0) then

Executes without any error

Session persistence can be used for storing long-term data between sessions

False

Stateless session beans are dedicated to one client.

False

Stub file resides on the server. State whether the statement is true or false

False

Swing components can?t be combine with AWT

False

The EJB deployer is unaware of the operational environments

False

The J2EE platform does not contain middleware services.

False

The client side is more complex than the server side

False

The contet in EJB found only in ENtity beans

False

The context in EJB is found only in Entity beans.

False

The developer needs to be concerned about the OTS

False

The developer needs to be concerned about the OTS.

False

The ejbActivate() method is called during a transaction

False

The ejbActivate() method is called during a transaction.

False

The jdbc classes are present in the java.lang package

False

There are multiple ways to persist entity beans.

False

Universal resource identifier represents a directory structure.

False

XML schema documents require the learning of cryptic languages like EBNF.

False

response.getWriter() method can be used within a JSP page.

False

The _________________________ interface needs to be implemented to be able to write an entity bean class.

javax.ejb.EntityBean

the interface __ intersace is implemented in the bean class along with other methods

javax.ejb.SessionSynchronization

which statement is true about EJB 3.0 containers

javax.naming.intialContext

The implicit variable config in a JSP page refers to an object of type:

javax.servlet.ServletConfig

JSPs or servlets can manipulate cookies using the _______________ class.

javax.servlets.http.Cookie

URL referring to databases use the form:

jdbc:odbc:datasoursename

which is true about jee(or j2ee)

jee includes servlet apis and ejb apis

which statement is not true

jms does not depend on mom

Which tag file action processes JspFragments in tag attributes?

jsp:invoke

The ________ action is used to associate a JavaBean in JSP.

jsp:useBean

4. True or False. XML Transformations can be used to create a form letter.

False.

The Javax Servlet Package contains classes to support

Generic Protocol Independent Servlets

con=DriverManager.getConnection(?jdbc:odbc: Employee?,? ?,? ?); What does the above statement do

Gets a database connection with the Employee data source.

Which is not a valid scope for Java bean in JSP?

Global.

8. What namespace contains the CultureInfo class?

Globalization

Applets are__

Graphical clients that normally execute within a web browser

158. ______ is an Object Request Broker available with JDK1.2 [1.5]

Java IDL

The Java IDL is an implementation of CORBA.

Java IDL

The ___________ is an implementation of CORBA.

Java IDL

The ______________ is an implementation of CORBA.

Java IDL

The__ is an implementation of CORBA

Java IDL

__ are used server-wide and have to be present

Java Naming & Directory Interface services

141. JSP stands for ________ [1.0]

Java Server Pages

JSP

Java Server Pages All cosmetic changes are done in JSPs

13. What object would you use if you need to support Netscape Navigator and Microsoft Internet Explorer?

Java applet

The rules for the conversational state are put forward by ______________________.

Java object serialization.

The _________ package implements the Tag interface

Javax.servlets.jsp.tagtext

4. The used in JavaServer Pages are

Jsp:useBean Jsp:setProperty Jsp:getProperty

Which object does a SimpleTag tag handler use to access implicit variables?

JspContext

The ________ represents a generic exception for the JSP packages

JspException

Which type of object is returned by JspContext.getOut()?

JspWriter

Four different types of JDBC drivers as specified by Sun are:

Ko phai JDBC protocol API driver

Match the following directory services

LDAP-Netscape,NDS-Novell,NIS-SUN OS

Match the following directory services: LDAP:Netscape-NDS:Novell- NIS:SUN OS

LDAP-Netscapte|NDS-Novell|NIS-SunOS

System.out.println(a.doit(4, 5))

Line 26 prints a to System.out

2. Which line causes a compile error in the following code? 1. interface Test22. {3. int Int2;4. void Method2A(int);5. string Method2B ();6. int Method2C(int, int);7. int Method2A(char);

Line 3

String s2 = "xyz"

Line 4, Line 6

Float floater = new Float(3.14f)

Line 6

String s2 = new String("xyz")

Line 6

String s2 = new String(s1)

Line 6

The Point class cannot be instatiated at line 15

Line.Point p = new Line.Point()

A model applied to static document objects is:

Linear Model

Class implement FIFO queue

Link list

class is used to implement a pull-down menu that provides a number of items to select from

Menu

Which is the BEST case use Container-managed persistent (CMP)?

Message-Driven Beans stateless

138. MOM stands for __________ [0.5]

Message-Oriented Middleware

What are call back methods?

Methods representing business logic.

Connection pooling and security management are examples of

Middleware

Connection pooling and security management are examples of _____________.

Middleware

129. _______ allows the client interact with the business components [0.5]

Middleware technologies

JSP Model II architecture follows the ____________ pattern

Model-View-Controller

MVC is short call of

Model-View-Controller

Consider the following code fragment Marks: 1 - Java Bean code package sample.web

Msg: 123-4

___________________ EJB class/es may be installed on a single container.

Multiple

Threads are implemented in Java with the Thread class in the ?????????.

Multitasking

some JDBC drivers?

MySQL driver, Oracle driver, SQLServer driver

The __________ uses local native libraries to communicate with the database

Native-API-Partly-Java Driver

Nav.Direction d = Nav.Direction.NORTH

Nav.Direction.NORTH

To run the client, the server __

Needs to be started before we run the client

negative byte is cast to a long

Negative

4. What is the default language for the fallback culture?

Neutral.

ob1 == ob2

No

How many locks does an object have

One

The ejbCreate() method should have ___________________ which must ___________ the create() method in the home interface.

Parameters/match

2. What namespace contains the ResourceManager class?

Resources

What code at line 3 produces the following output

String delim = ?\\d+?

Stringent isolation levels ensure low levels of performance, whereas loose isolation levels lead to high performance.

Stringent/loose

__isolation levels ensure low levels of performance,whereas__isolation levels lead to high performance

Stringent/loose

In order to format an XML document we combine it with a

Style sheet

101

Switching Protocols Server will comply with Upgrade header and change to different protocol. (New in HTTP 1.1)

Client interaction to entity beans is :

Synchronous

Swing components cannot be combined with AWT components

T

The code in an individual ejb component can be modified whith out requiring a change

T

after execution of line 1, sbuf references an instance of the StringBuffer class. After execution of line 2, sbuf still references the same instance

T

JSP is used for creating dynamic web pages using pure Java codes embedded as

Scriptlets User-defined tags HTML tags

156. ______ forms the basic communication language over the internet [1.5]

TCP/IP

3. What important standard is used to connect client browsers with web servers?

TCP/IP

Name the http method that sends the same response as the request.

TRACE method

The dirty read problem is solved by the__mode

TRANSACTION_READ_COMMITTED

The__mode offers performance at the highest level

TRANSACTION_READ_UNCOMMITTED

What are different transaction isolation levels set during deployment

TRANSACTION_READ_UNCOMMITTED

What are the different Transaction isolation levels set during deployment?

TRANSACTION_READ_UNCOMMITTED

Which transaction attribute cannot be set while deployment

TX_NOT_REQUIRED

2. What type of commands can you create?

TableDirect.

Which tag file directive makes it possible to process dynamic attributes?

Tag

Which attribute of <c:if> specifies the conditional expression?

Test

The transaction coordinator asks each transaction manager to commit

The..will?Each of..?Each transaction..?The..asks

The transaction coordinator will send a prepare to commit message to every transaction manager that is involved

The..will?Each of..?Each transaction..?The..asks

Match the following directory services: LDAP:Netscape-NDS:Novell- NIS:SUN OS

Theo th? t? tr?n

How can you ensure that multithreaded code does not deadlock

There is no single

134. SSL stands for ________ protocol. [0.5]

Secure Socket Layer

An XML Schema allows you to specify an element as an integer, a float, a Boolean, a URL, etc.

True

An application that requires any restructuring or redeployment to scale will impede growth

True

Assigning a style to a tag helps the user agent to interpret the data following specific rules.

True

Constant storage can be done on a file

True

Constant storage can be done on a file.

True

Distributed flat transactions allow multiple application servers to collaborate under one transactional cover

True

Element inheritance uses an object-oriented approach to support relationships between elements.

True

HttpSession objects have a built-in data structure that lets ... values

True

Message-driven beans do not have any return value.

True

Object-Relational mapping is more sophisticated than Java serialization.

True

Remote objects are always referenced through an interface

True

Remote objects are always referenced through an interface.

True

Servlets & JavaServer Pages enable dynamic content in HTML, XML

True

Servlets are programs that run on a Web server, acting as a middle layer between ... HTTP server

True

Session death can come about through an explicit call(in servlet) to http session invalidate()

True

Setting isThreadSafe to false consumes additional memory And can cause performance to degrade.

True

Socket communication is ideal for exchanging files or small amounts of data.

True

The formatting components of XSL are not supported by IE5.

True

There is an increased chance of losing conversations while using stateless session beans

True

To use the data type namespace in a schema, it must be declared within the Schema element.

True

remote object are always referenced through an interface

True

Bytecode characters are all 16 bits

Unicode characters

In CSS, separation of multiple value combinations is by using a:

Semi-colon

8. What is required in order to be able to install and use SSL on a web server?

Server certificate.

Which role in EJB architecture is responsible for EJB Server?

Server provider

140. Servlets are ______ programs [1.0]

Server side

__ enhances reusability and portability

Server-side component architecture

Server-side component architecture enhances reusability and portability.

Server-side component architecture.

___________________ enhances reusability and portability.

Server-side component architecture.

______________________________________ enhances reusability and portability.

Server-side component architecture.

HTTP,HTTPS,JDBC,JTA are__technologies

Service & Communication

operations required by the application. [1.0]

Service Layer

10. A Windows service must inherit from which class?

ServiceBase

15. Which attribute must be added to create an exposed web service method?

Services.WebMethod]

Which sub-element is used to define a logical name of servlet in web deployment descriptor?

Servlet-Name

126. The WAR file consists of : (choose three ) [1.5]

Servlets// .gif file // tag libraries

160. The two types of Enterprise beans are ______ & ______ [1.5]

Session bean //Entity bean

The life of a/an__is comparatively smaller than that of a/an__

Session bean/entity bean

The concept of maintaining a state between different requests is known as ____________

Session tracking

Circle c = new Circle(); c.Shape.setAnchor(10,10); c.Shape.draw()

Shape s = new Circle...s.draw()

11. Which line of code must be added in order to show a StatusBar?

Show = true;

Select INCORRECT statement about serialization

When an Object Output

2. When will the garbage collector run?

When the application is low on memory.

<%! int count=10 ctr=20%> What does the above statement do?

Will result in an error

3. Which project template will allow you to create a background service in Visual Studio .NET?

Windows service.

15. In which namespace would you find the class Application?

Windows.Forms

The full form of WML is___

Wireless Markup Language

While defining the bean class, are the following statements valid:public void ejbActivate();{}public void ejbPassivate();{}public void ejbRemove();{}

Yes?they are valid

Entity bean is ______

[A] a persistent data component

1. Where should a web service proxy file be located?

\bin application.

Every time a request is received by the JSP container the ________ method generated by it is invoked

_jspService() & _jspRequest()

9 U07-Q001 The ______ JDBC driver uses network protocol to middle tier to access a specific network database.

a Type 3 X

The 'appendChild()' method of the DOMDocument Object adds:

a new node

Entity bean is ______

a persistent data compone]nt

Entity bean is ______

a persistent data component

Object ob2= ob1

ob1 equals ob2, ob1==ob2

Syntax for createNode Method is:

objNode=oDocument.createNode(Type,name,namespaceURI)

181. in ____ Java objects are stored as whole objects

object database management

188. The fields of an object are mapped to a relational database in __ mapping

object-relational

A primary key is a/an ___ consisting of 'n' number of ___

object/objects

A primary key is a/an _______consisting of 'n'number of _______________.

object/objects

In XSL the different source elements are separated by a:

pipe-stem

101. The J2EE modules are _____ and _______ [0.5]

portable

Man has the best friend who is a Dog

private Dog bestFriend

txtHello? (All objects are correctly created.)

rm.GetString("txtHello")

15. In which directory does the <application_name>.exe.config file belong?

root directory

In order to start the server, we need to give the__command at the command prompt

run

Server side component architecture manages the components during

run time

If a class implements the Runnable interface, what methods must the class contain?

run()

catch (InterruptedException e)

running some time

The different types of JDBC driver are

sai la : Native-API pure Java driver

Which line of code tells a scanner called sc to use a single digit as a delimiter

sc.useDelimiter("\\d")

92. The major issues of enterprise application are: (choose three) [2.0]

scalability d) performance c) sharing data

Transient methods may not be overridden

variables are not

6. Which method is not in Thread class ?

void setSleep(long)

Which is correct JDBC-ODBC driver name?

sun.jdbc.odbc.JdbcOdbcDriver

Which is correct JDBC-ODBC driver name? (choose 1)

sun.jdbc.odbc.JdbcOdbcDriver

4. Which is keyword used to handle conflicting resources among threads ?

synchronized(resource)

Instructions that control how an element and its content should be converted in XSL style sheets, are called:

templates

8. What is the default namespace for a new web service?

tempuri.org/

The 'description' element is a:

text-only element

accurately describes how variables are passed to methods

that are primitive type are passed by value

first second first third snootchy 420

third second first snootchy 420

An exception is thrown at line 6

thrown at line 7

Which two services does EJB provide?

transaction services[2] lifecycle management

__are services, which are required for robust server-side development

transactions

What keyword is used to prevent an object from being serialized

transient

162. Data needs to be pushed to stateful session bean for every medthod invocation

true

187. Object-Relational mapping is more sophisticated than Java serialization

true

3.http Sesision object live on the server

true

A final class may not have any abstract methods

true

A thread can be created in two ways: by subclassing the Thread class or implementing the Runnable interface in another class.

true

COnstant storage can be done of a file

true

The PDA, mobile system & others could be either interactive or non-interactive

true

The good Transaction system should be reliable, efficient in terms of scaling & performance

true

Transactions are useful for perorming persistent operations

true

a message-driven bean must commit a transaction before

true

http Sesision object live on the server

true

http sesision object live on the server true

true

when you obtain a session (using getsession() of http...)

true

Line 4 executes and line 6 does not

Line 6 executes

sharedOb.wait()

2.aThread.interrupt, sharedOb.notifyAll

Date vaccinationDue

2.boolean, String

Primitives are passed by reference

2.by value

1000

-1

#Which is NOT EJB container?

Apache Tomcat 5.5

Business logic is placed in_____

Middle-tier

Security roles may be omitted in EJB

False

Security roles may be omitted in EJB.

False

Session beans have a primary key.

False

How is IllegalArgumentException used

2.certain methods, public methods

The ______ security allows password matching strategies

--Programmatic

Base(int j, int k, int l)

2.Base(), Base(int j, int k)

What executes EJB components ?

--An EJB container.

The _______ tags generally do not contain any body.

--Basic

Publish/Subscribe

--Message Oriented Middleware(MOM)

Yen and Euro both return correct Country value

2.Euro returns, error at line 25

ArithmeticException

1.None of these 2./

may be statically imported

1.Static method names 2.Static field names

Select the valid primitive data type

1.boolean 2.char 3.float

legal import statements

1.import java.util.Vector 2.import static java.util.Vector

3. How many thread priorities in Java ?

10

Holder h = new Holder()

101

List<String> names = new ArrayList<String>()

2.Iterator, for

Decrementer dec = new Decrementer()

12.3

match the following

18/2c/3d/4a

Math the following CLIENT_IDENTITY SYSTEM_IDENTITY SPECIFIED_INDENTITY ...

1a 2b 3c

matching the following 1.ejbfind 2. ejbStore 3.ejbPostCreate() 4.ejbLoadperformed

1b/2c/3a/4d

1 2 3

2 3

double d = 1.2d and double d = 1.2D

2 dap an

char c = 0x1234

2.0x.., '\u1234'

can legally be placed before aMethod() on line 3 and be placed before aMethod() on line 8

3: private; 8: protected

Total bytes per cookie should be ______.

4 kb

for (int i = 0; i < 2; i++)

4.i0,j12 - i1,j02

Arrange the steps in which the two-phase commit works: 1.Each transaction manager then reports..

4312

${(1==2) ? 4 : 5}

5

61. The J2EE stack consists of ____ layers. [0.5]

6

The number of bytes depends on the underlying system

8

A bean can act as a client for other beans.

True

5. When writing server-side code, what marks are used to indicate the code block?

<% %>

Scriptlets are enclosed within the ____________ markers.

<% and %>

Which syntax is correct for JSP Expressions?

<%=expression %>

your jsp page uses java.util.treemap. adding which of..

<%@ page import="java.util.TreeMap"%>

The correct syntax of a taglib directive is

<%@taglib uri=tagLibraryURIprefix=tagPrefix%>

3//en" "http://java.sun.com/dtd/web-app_2_3.dtd"> <we-app> <jsp-config> <jsp-property-group> <url-pattern>*.*</url-pattern> <el-ignored>true</el-ignored> </jsp-property-group> </jsp-config> </web-app> <?xml version="1.0" ?> 4" xmlns="http://java.sun.com/xml/ns/j2ee" w3.org/2001/xmlschema-instance" sun.com/xml/ns/j2ee sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <jsp-config> <jsp-property-group> <url-pattern>/*</url-pattern> <el-ignored>true</el-ignored> </jsp-property-group> </jsp-config> </web-app>

<?xml version="1.0" ?> 4" xmlns="http://java.sun.com/xml/ns/j2ee" w3.org/2001/xmlschema-instance" sun.com/xml/ns/j2ee sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <jsp-config> <jsp-property-group> <url-pattern>/*</url-pattern> <el-ignored>true</el-ignored> </jsp-property-group> </jsp-config> </web-app>

4. What HTML element is the asp:panel control rendered as?

<div>

When writing a TLD, which tags would you use to surround fnName(int num), a Java method declared in a separate class?

<function-signature></function-signature>

The font-size option 'larger' is used for

<relative-size>

Syntax for a typical template element is

<xsl:template match = "myElement">

Identify the tag required to match the entire document.

<xsl:template match= "/ |">

29. Which annotaton is not defined in Java ?

@Author

Which statement about entity manager is true?

A container-managed entity manager must be a JTA entity manager*

Select incorrect statement about RMI server

A client accesses

What does an instance of an entity bean represent as per EJB1.1 Specification

A row of a database

A failed transaction is__whereas a successful transaction is __

Aborted/committed

202

Accepted Request is being acted upon, but processing is not completed.

How do you prevent shared data from being corrupted in a multithreaded environment

Access the variables

When the user selects a menu item, _______ event is generated

Action event

1. Which code segment will populate a DataSet?

Adapter (dsUsers1);

EJB is a

All of the above

IN CSS styling property value may be

All of the above

8. The Format event is triggered after which occurrences?

All of the above.

EJB is a

All of the above.

Which of these characteristics of a filter is true?

All of the others

System.out has a println() method

All the above

public interface B inheritsFrom A

B extends A

Stateless session beans are also known as

Anonymous method providers

Stateless session beans are also known as __

Anonymous method providers

s is true?

Any serializable object can be put into a session.

Which is NOT EJB container?

Apache Tomcat 5.5

Databases cannot be accessible by____

Applets

72. The _______ tier implements business logic. [1.0]

Application

__produces the basic building blocks of J2EE application

Application Component Provider

4. Which security file will override the machine configuration file?

Application configuration

15. What ASP.NET object encapsulates the web site?

Application object.

Which part of multi-tier enterprise application contains EJB component?

Application server

21. Which class allow us to use index for accessing its elements ?

ArrayList

In ______ bean class, no instance variable should be declared.

Astateless session

The element 'Schema' is declared in DTD as having three child elements, which are:

AttributeType // ElementType // description

Select the flawless tags used to create a margin

A{margin-left:10%;} , A{margin-left:10cm;}

Component Interfaces in Session Bean may have _____

Both local and remote interfaces

5. What does the following command do? csc /res:strings.resources HelloGlobalWorld.cs

Builds the HelloGlobalWorld and links the fallback resource.

__tier of J2EE model contains the data processing logic

Business

CLIENT_IDENTITY circulate the client?fs security context

CLIENT_IDENTITY?circulate..context;SYSTEM_IDENTITY-run..authority,SPECIFIED_IDENTITY-runAsIdentity

SPECIFIED_IDENTITY runAsIdentity

CLIENT_IDENTITY?circulate..context;SYSTEM_IDENTITY-run..authority,SPECIFIED_IDENTITY-runAsIdentity

SYSTEM_IDENTITY run the bean using system-level authority

CLIENT_IDENTITY?circulate..context;SYSTEM_IDENTITY-run..authority,SPECIFIED_IDENTITY-runAsIdentity

Which EJB uses EJB-QL for query operations?

CMP Entity Bean

__ is not a model for developing distributed applications

COM

___________________ is not a model for developing distributed applications

COM

14. Which line of code will register a channel?

Channel(channel);

13. To which namespace does the HttpChannel class belong?

Channels.Http

4. You want to add a control to your form that allows you to set a particular option on or off. Which control would you choose?

CheckBox

70. The _______ tier implements presentation logic. [1.0]

Client

The Access Control does not take care of

Client?fs identities

Which three digit error codes represent an error in request from client?

Codes starting from 400

getTimestamp( ) method is used for extracting

Column data

Repeated creation of an object whenever it is required is persistence

False

Which is the four steps are used in working with JDBC

Connect, Create, Look

Selectors helping us to differentiate between different occurrences of a tag are termed as

Contextual Selectors

56. The J2EE platform communicates with the outside world in a way known as _____ [1.5]

Contracts

Servlet

Control all activities in web applications These are like traffic cops

A ______________has a name, a single value, and optional attributes such as a comment, path and domain qualifiers, a maximum age, and a version number.

Cookie

The Two main methods that JSP employs to track sessions are :

Cookies URL rewriting

15. What must be done to create a ToolTip on a new Windows control?

Create a MessageBox

The ___ exception is necessary for all create methods

CreateException

The ___________________ exception is necessary for all create methods.

CreateException

118. The Java code generation is done in _____ stage. [1.0]

Creation of Components

list of primitives ordered in smallest to largest bit size representation

D. char, int, float, long

71. The _______ tier implements database management services. [1.0]

Data

3. Data access exceptions all derive from which base class?

DataException

5. What is the root exception for the ADO.NET objects?

DataException

A(n) _______ enables a web application to obtain a Connection to a database.

DataSource

4. What object is used to encapsulate a rowset?

DataTable

5. What namespace is needed for Event Log support?

Diagnostics

an event log?

Diagnostics

The three main types of JSP constructs that can be embedded in a Java Server page are

Directives Actions Scripting Elements

Reading of uncommitted data from the database represents the__problem

Dirty read

Parameter entities:

Do not establish a relationship between elements that share similar properties.

Choose the odd one out. Entity beans can

Do without a primary key

Entity beans can -

Do without a primary key

135. DTD stands for _________ [0.5]

Document Type Definition

63. In ______ layer semantic validation of new information takes place. [0.5]

Domain

object is uses to obtain a Connection to a Database

DriverManager

public void doGet(HttpServletRequest request, HttpServletResponse response)

E. ?request, 2nd request, null? written to standard output

abstract class can contain methods with declared bodies.

E. public, protected, default, private

is an architecture for building re-usable server-side components.

EJB

Incase of CMPs the ___ implements the finder methods

EJB container

96. The J2EE are partitioned into: (choose three) [2.0]

EJB containers// Database //J2EE Web Container

The__keeps track of every client and its Identity object

EJB server

Match the following:

EJB-technology,JDBC-..database

The SessionContext interface extends the _______________ interface.

EJBContext

The SessionContext interface extends the interface.

EJBContext

Where are the finder methods in CMP implemented?

Ejb-jar.xml

9. What are the three different policy-configuration files?

Ent Mac User.

55. The application assembler delivers _____ file [1.5]

Enterprise Archive

EJB

Enterprise Java Beans

EJB stands for____

Enterprise JavaBeans

Which EJB usually represents persistent data?

Entity Bean

_ beans have a higher level of reuse

Entity bean

__beans have a higher level of reuse

Entity beans

How can a CMP 2.0 entity bean retrieve its primary key?

EntityContext.getIdentity()

For what reason does the following JSP fail to translate and compile?<html><body><%!intx%><%=x;%></body></html>

Error in JSP Expression.

Servlet are durable objects because they remain in the memory until they are destroyed _

Explicitly

8. Where would you find the Add Installer link within Visual Studio .NET?

Explorer window.

In WSDL a <port> refers to

Exposes a <service> using a specific protocol binding

A Java monitor must either extend Thread or implement Runnable

F

Even if the client timesout the ejbRemove() method is called

F

The element method alters the contents of a Queue

F

There are multiple ways to persist entity bean

F

The J2EE platform does not contain middleware services

FAlse

'small-caps' is a value supported by font-style

False

130. A stateful session bean exists even after the session expires. [0.5]

False

150. XML cannot be used to create customized views of data depending on clients requirements [1.0]

False

151. Servlets do not run on the server and they do have an interface. [1.5]

False

65. In J2EE the developer cannot use the server side services. [0.5]

False

Bean-managed State Fields are non-persistent fields.

False

Browsers typically cache the server?s response to a POST request.

False

Can a blank method be added in Home interface as per EJB 1.1 spec?

False

Default value for model attribute is 'closed'.

False

Developers of enterprise applications are not able to deploy applications effectively & quickly

False

Even if the client times out, the ejbRemove() method is called.

False

Every component need not be present in the Container

False

In EJB, BMPs are more used than CMPs.

False

In Javaserver pages one cannot separate content generation from presentation.

False

In XML, schema files are a must.

False

In an open content model elements other than the required elements cannot be present.

False

J2EE is a kind of Techlonogy

False

J2EE is platform-dependent

False

Java arrays always start at index 1

False

Once the server has been started, the client code can be executed from the same window.

False

Programming to a relational database is required in object database management.

False

are valid arguments to the DataInputStream constructor

FileInputStream

84. _______ is used to prevent unauthorized access to a private network. [1.5]

Firewall

The two major transactional models are__and__

Flat transactions/nested transactions

11. What tool is used to manage the GAC?

GacUtil.exe

How can you force garbage collection of an object

Garbage collection

How many errors are there in the following code snippet public interface MyEx extends remote { String getDataNum() String getData(int a) throw

Four

How many errors are there in the following code snippet.

Four

A user types the URL http://www.javaprepare.com/scwd/index.html . Which HTTP request gets generated

GET method

Which HTTP method gets invoked when a user clicks on a link?

GET methoda

10. What layout mode is the default when a new Web Form is created?

GridLayout

# What are possible outcomes from executing the doGet method in ServletC below? (Choose two.)

HTTP 500 error (error in 500s);Some other exception.

The following techniques can be employed to maintain state in Web Applications:

HTTP Information Hidden Fields Extended path...

22. Which is not an interface ?

HashMap

19. Which class isn't implemented List interface ?

HashSet

20. Which class isn't implemented Map interface ?

HashSet

Which of these classes implements the Map interface?

Hashtable

Object ob2= new Object()

Have a nice day

7. How is the data represented in an XmlDataDocument?

Hierarchical

The Life cycle of EJB is defined by:

Home Interface

The Life cycle of EJB is defined by__________________.

Home Interface

THe life cycle of EJB is defined by _

Home interface

The life cycle of ejb is defined by

Home interface

Name the class that includes the getSession method that is used to get the HttpSession object.

HttpServletRequest

A session is begun when servlet code invokes HttpServletRequest.getSession() method.

HttpServletRequest.getSession() method

_________ class is an extension of the ServletResponse class

HttpServletResponse

132. HTTP stands for _________ [0.5]

Hypertext Transfer Protocol

A statement has a question mark (???) as a placeholder for every _______ parameter.

IN

Which is four-step approach to help you organize your GUI thinking

Identify, Isolate, Sketch

Which object(s) can be used in JSP without declaring or initializing?

Implicit objects

Java Servlets

In Enterprise development, this is the recommended approach.

????.and????..are designed for byte streams.

InputStream and OutputStream

Variables created within a declaration block become_________ variables

Instance

7. What is wrapper class of int primitive type ?

Integer

The advent of B2B led to__

Inter-organization communication

In__there is exchange of either data or reports

Inter-organization communications

J2EE stands for____

Java 2 Platform Enterprise Edition

What are two features of IIOP?

It is connection-based. [2] It is used for remote-object communications.

XSL does not provide support for:

It provides support for all the options stated.

Which design pattern is represented by the JDBC ResultSet class?

Iterator

108. A single archive file with .ear extension is a _________ file. [0.5]

J2EE application

52.The statements true about J2EE are _________ [1.5]

J2EE is multi-user //b) J2EE is portable system.

103. The structural information describes various components of the ______file. [0.5]

JAR

Which are EJB containers ?

JBoss ;BEA's WebLogic ;IBM WebSphere

#Which are EJB containers

JBoss;BEA's WebLogic;IBM WebSphere

161. _____ allows the application developer to connect to relational databases. [2.0]

JDBC

The bean accesses the database using

JDBC

The bean accesses the database using ______________.

JDBC

The bean accesses the database using ______________. (JDBC )

JDBC

162. javax.sql package is used as ______ package. [2.0]

JDBC 2.x Optional

which java technology provides a unified interface to multiple

JNDI

Authentication can be accomplished using the JNDI API.

JNDI API

Authentication can be accomplished using the__

JNDI API

91. The modules of Domain layer are : (choose two) [1.5]

JNDI b) Java Connector architecture

Which is true about JOBC?

JOBC is used to connect to MOM (Message-Oriented Middleware Product)

60. ______ is used to generate dynamic content for web. [0.5]

JSP

Which of the following shoild a preogrammer be concerned about

JTA

The OTS has been separated into two APIs that are

JTA/JTS

7. The Items property of a ListBox is a reference to what kind of object?

ListItem

Users browse the net, access their emails on the mobile using____

M-Commerce

In EJB2.0, ejb-jar.xml deployment descriptor file must be placed in ______________folder

META-INF

Identify correct statements about the META-INF directory from the list below. (Choose three.)

META-INF is a suitable location for storing digital certifi cates. The MANIFEST.MF file is found in the META-INF directory. META-INF is not directly accessible to clients.

86. In n-tier approach the application follows _______ pattern. [1.5]

MVC

57. ___________ is used when accessing Enterprise JavaBeans [1.5]

RMI-IIOP

Identify the statements which hold true for CSS

None of the above

What is the outcome..context.removeAttribute("mutable");

None of the above.

'XMLDOMEntity' is an XML DOM Object that:

None of the options given

MVC Technologies

Normal Java classes, Java Bean, EJB

session.setAttribute("login"?, new Login());}}

Nothing is wrong with this filter

144. NDS stands for ________ [1.0]

Novell Directory Services

11. What is the SQL argument that sorts the data returned by an SQL SELECTstatement?

ORDER BY

The available document models of DOM are:

Object Model /// Linear Model // Tree Model

OQL stands for Object Query Language.

Object Query Language

OQL stands for _____________.

Object Query Language

In _________________________ Java objects are stored as whole objects.

Object database management

178. In EJB, persistence can also be termed as ___

Object durability

In EJB, persistence can also be termed as ______________.

Object durability

Which method is used to retrieve an attribute from a ServletContext?

Object getAttribute(String name)

191. OQL stands for ____

Object query language

Sun's JavaBlend and Object People's TOP link are examples of a/an _________ product.

Object-relational

The findByPrimaryKey() method throws the _________ exception if no matching records are found in the database.

ObjectNotFoundException()

Which pattern allows dependent objects to be notified when an object changes state?

Observer

Attribute 'xmlns' indicates:

One or more namespaces for use with the schema

What are responsibility the deployer respected in EJB development?

Only 2

An abstract class may not have any final methods

Only statement 2

Suppose you want to create a custom thread class by extending java.lang.Thread in order to provide some special functionality

Override run()

Name the http method used to send resources to the server.

PUT method

The JTA is a Package.

Package

The JTA is a _________________________.

Package

The JTA is a__

Package

Which is least visibility scope for Java bean in JSP?

Page

A java bean in a JSP can have which of the following attributes

Page Request Application Session

The ________________approach of JSP model involves request invocations being made directly to JSP.

Page-centric

In CSS, identification of a selector context is done by using a

Period

58. ________ provides CRUD service

Persistence Layer

Entity beans are called Persistent objects.

Persistent

Entity beans are called _______________________ objects.

Persistent

The employee details, i.e., the name, designation, H.R.A, D.A., etc. will be managed by the _______________________ component.

Persistent data component

5. J2EE consists of the following three tiers

Presentation tier Business tier Data tier

Only entity beans can be destroyed by passing the __

Primary key

The Programmatic security allows password matching strategies

Programmatic

The ____ security allows password matching strategies

Programmatic

3. The two primary constituents of JavaBean are

Properties Methods

166. Remote Object Protocols include : [2.0]

RMI JMS

which is true about RMI

RMI allows object to be

15. File class hasn?t methods which are used to

Read file content

'XMLDOMNodeList' property is

Read only

3. What is used to validate complex string patterns like an e-mail address?

Regular expressions.

In _____________________ databases, each Java object is decomposed into its constituent part, which is stored separately.

Relational

Which is not a way of making an object persistent.

Relational Database Management System

179. Which is not a way of making an object presistent

Relational database management system

The Remote Interface does not have any methods.

Remote Interface

The ___________ does not have any methods.

Remote Interface

The ___________________ does not have any methods.

Remote Interface

The _ does not have any methods

Remote interface

The deployment descriptor contains essential information regarding ___________

Remote interface

The component interface of ejb-jar file includes Remote interface and Home interface.

Remote interface and Home interface

Beans can have the following scope (Choose two)

Request & Application

The__also manages the state of the bean

Resource Manager

The__represents storage from where one can read and write

Resource Manager

The __ also manages the state of the bean.

Resource manager

Statement objects return SQL query results as

ResultSet

The Retention meta-annotation is used to specify how long an annotation is retained.

Retention meta-annotation

5. What should be added to basic authentication?

SSL

8. How many rules are there regarding a well formed XML document?

Six

J2EE supports cross-platform development such as (Select all that apply)

Solaris & IBM OS/390 & Linux

When is x & y an int

Sometimes

xarr is an array of XXX, and the type of yarr is an array of YYY

Sometimes

IllegalArgumentException

StackOverflowError

Which of the beans cannot be pooled?

Stateful session bean

Which of the beans cannot be pooled?

Stateful session beans

A ______________ session bean is a bean that holds conversations that span a single method call

Stateless

142. Types of session beans are _____ and ________ [1.0]

Stateless bean // Stateful bean

SQL statement without parameters are normally executed using ________objects

Statement

object is used to submit a query to a database

Statement

_________ can be invoked using CallableStatement object.

Stored Procedures

3. The statement that is used to replace multiple if statements is called:

The case statement.

11. What method must be overridden in a custom control?

The Render() method.

4. Where are stored procedures saved?

The database server.

The keyword extends refers to what type of relationship

is a

The setCardlnformation method breaks encapsulation

The ownerName

<form action="jsecuritycheck" method="POST">

The page is redisplay

Which statement about passivating session beans is true?

The passivated stateful session bean should close all connections before being passivated

public class mybean implements SessionBean, SessionSynchronization{... void ejbCreate(int num) throws createException}

The valure of num is restored to its original value.

Which is NOT true about stateless session beans?

They are CANNOT hold client state

Depending upon scrollability how many types of result sets are available in JDBC API?

Three

Tranditional enterprise application providers have client server application of____models

Three-tier

What does the following code do

Throws an exception

The database connection consumes vast amount of resources in terms of__

Time & Memory

___________ provides precision to Java Date by adding a nanosecond field.

Timestamp

4. Trace switches can be set using which class?

TraceSwitches

The__operates behind the scenes performing all its tasks

Transaction Manager

__is an application component, which may be an Enterprise bean, a server component or a CORBA object

Transactional Object

Transactions are services, which are required for robust server-side development.

Transactions.

__are services, which are required for robust server-side development

Transactions.

Which is NOT belonging to basic three types of EJB?

Transfer object*

Each JSP goes through two phases. Select them

Translation time Request time

A model applied to dynamic documents is known as:

Tree Model

If you need a Set implementation that provides value-ordered iteration, which class should you use

TreeSet

# Is the following statement true or false. If the isThreadSafe attribute of the page directive is false, then the generated servlet implements the SingleThreadModel interface

True

115. The deployment descriptor is essentially a file.

True

131. Multiple clients can share an instance of an entity bean. [0.5]

True

133. Does TCP/IP ensure that the packets are error free during transmission process? [0.5]

True

62. In a distributed enterprise system, one schema can support many clients. [0.5]

True

A bean can act as a client for other beans

True

Java Web Services developed with JAX-RPC interoperate with .Net

True, because they both generate the same SOAP message

JDBC supports ______ and ______ models

Two-tier and three-tier

9. Given an ASP.NET Web Form called WebForm1, what class does the WebForm1 class inherit from by default?

UI.Page

What relationship does the extends keyword represent

is a

Your servlet class depends on a utility class named com.abc.TaxUtil. Where would you keep the TaxUtil.class file?

WEB-INF/classes/com/abc

Mobiles understand___

WML

Select INCORRECT statement about deserialize

We use readObject

13. How do you enable tracing?

Web Form to True.

11. Which namespace is added to a program that calls a web service?

Web.Services;

Match the following.ejbFind() ejbStore()

ejbFind()-CMPs,ejbStore()-update the database

118. Deployment properties are stored in a __ file

XML

Deployment properties are stored in a _______________________ file

XML

Extensible Markup Language is the full form of____

XML

148. _________ stands for Extensible Stylesheet Language [1.0]

XSL

XSL provides a transformation language called:

XSLT

3. What object is used to encapsulate a data source?

XxxConnection

TestThread3 ttt = new TestThread3

Y

Once the bean instance is associated with the EJB Object, the _____________________ is called.

ejbPostCreate()

method is used to wait for a client to initiate communications

accept()

#Which is NOT the main type of JSP constructs that you embed in a page?

actions

When the client calls a bean, it can in turn call another bean.

agree

# The top three value of EJB are (choose 3)

agreed upon; Portability; Rapid application development.

The major advantage of container-managed persistence is

all of above

The HttpServletRequest has methods by which you can find out about...

all the above

8. When would you not use the OleDbConnection object?

an SQL 7.0 database.

which scenario below could best use transfer object as a solution? (choose one.)

an application appears to have hit a bottleneck when using some ejbs. on analysis, it

Security roles can be specified based on the type of__used

application server

which of following is not an ejb requireed method

ejbStore()

Which of the following attribute determines if the output stream is buffered.

buffer=none | <size in kb>

which is not enterprise beans

business beans

25. Databases cannot be accessible by _________ [1.0]

c) Applets

38. _______ tier of J2EE model contains the data processing logic [1.5]

c) Business

10. Traditional enterprise application providers have client server application of ________ models. [0.5]

c) Three-tier

In XSL the sign that indicates that sorting takes place in the descending order is:

c)'-'

Which is a valid PostConstruct method in a message-driven bean class?

c. @PostConstructprivate void init() {}

The container has one component that should take up as much space as possible

c. BorderLayout/ d. GridBagLayout

HTTP error back to the browser? (Choose one)

c. Both are defined in HttpServletResponse.

EJB 3.0 specifications are first implemented in ________

c. Java EE 5

91. _________________ provides a way to identify a user across more than one page request or visit to a Web site and to store information about that user.

c. Session management

Which is NOT represented in a UML class diagram?

c. The interaction between objects in sequential order

What two primitive types are interchangeable when you?re working with streams?

char and int

3. When discussing the XML Web Services architecture, which sentence best describes the service broker node?

consumer

78. CRUD represents for : [1.0]

create, read, update, delete

What method of the java.io.File class can create a file on the hard drive

createNewFile()

1. Which command will cause an XML file to be generated from documentation comments

csc .xml

#Which is correct JDBC-ODBC driver name?

d) sun.jdbc.odbc.JdbcOdbcDriver

What executes EJB components ?

d. An EJB container.

A Java developer needs to be able to send email, containing XML attachments, using SMTP. Which JEE (J2EE) technology provides this capability?

d. JavaMail

Which technology is used for processing HTTP requests and mapping those requests to business objects

d. Servlets

The application must be run with the -enableassertions flag or another assertionenabling flag

dai nhat, one or more

1. What is the code for the German language?

de

Component are automatically listed in __ transactions

declarative

6. What is the name of the root element in a WSDL document?

definition

102. ______ is an XML file. [0.5]

deployment descriptor

Which method in the HttpServlet class services the HTTP POST request?

doPost(HttpServletRequest, HttpServletResponse)

doStuff x = 6 main x = 6

doStuff x =5 main x =5

class A extends java.util.Vector { private A(int x)

does not create a default

Which is NOT a state in the EJB 3 Entity beans life cycle states?

e. Exit

6. Which XML line(s) generates an employee attribute?

ee name=/ee Name='Ken'

Where are the finder methods in CMP implemented?

ejb-jar xml

The _______ method should be used in CMP for checking the client parameters.

ejbCreate()

Compilation fails because of an error in line 15

error in line 19

The exception-type element specifies an exception type and is used to handle exceptions

error-page

The ------- method returns the security identity of the client

etCallerldentit()

The method _________ is designed for statements that produce a single result set, such as SELECT statements

executeQuery()

184. The process of querying stored objects using objects serialization is ____and __

expensive/cumbersome

Bean-managed state fields are non-persistent fields

f

in ejb BMPs are more uesd than CMPs

f

the ejbActive() method is called during a transaction

f

171 Stateless session beans are dedicated to one client.

false

CMP applications are completely portable

false

For encoding URLs that send the redirect command.

false

If the cookie does not have an expiry date it remains on the clients machine permanently

false

presses submit

first:first:second

<%@taglib uri = "test_taglib" prefix = "myTag"%><% session.setAttribute("first", "first");%><myTag:TestTag/>

first;second

When a short is added to a float

float

Suppose salaries is an array containing floats

for (float f:salaries)

The ________________ method returns the security identity of the client.

getCallerIdentity()

The context object adds new method which are:

getEJBObject() / getPrimarykey()

Which is correct JDBC-ODBC driver name?

getObject ;getText ;getInt;getString

The getParameter() method gives addition information about servlet

getParameter()

A Boolean value is returned by the method.

getRollbackOnly()

The finder methods defined in the _________________ should match the ejbFind methods in the actual __________.

home interface/bean class

create() method of entity bean home interface returns _____________

home object

Consider the following code statement

http://localhost:8080/Final/abc/FinalServlet

Consider the following code statement: respon.sendRedirect(?/abc/FinalServlet?); Assume that the ??

http://localhost:8080/Final/abc/FinalServlet

To load a java class file e.g. Aptech class in the browser URL location bar we type

http://localhost:8080/servlet/Aptech

what is the most likely outcome.. long date = request.getdateheader("post");

illegalArgumentexception

An anonymous inner class that implements several interfaces may extend a parent class other than Object

implement at most, class may extend

Identify the attribute applied to a property to give it precedence over other properties.

important

When is it appropriate to pass a cause to an exception's constructor

in response to catching

it also has a method called chopWoodAndCarryWater(), which just calls the other two methods

inappropriate cohesion, inappropriate coupling

What are the three directives defined in the JSP specification

include page taglib

In request dispatcher, both ____ and ____ methods are used for servlet communication.

include/forward

500

indicates an error inside the HTTP server which prevented it from fulfilling the request.

401

indicates that the request requires HTTP authentication.

The init() method initializes the servlets

init()

restrictions apply to anonymous inner classes

inside a code block

When a byte is added to a char

int

public float aMethod(float a, float b) throws Exception

int a,b float p,q

Which of the following expressions results in a positive value in x

int x = ?1; x = x >>> 5

what are the possible types for variable result

int, long, float, double

Which JspFragment method is used to process body content in a SimpleTag?

invoke()

When does an exception's stack trace get recorded in the exception object

is constructed

The methods available for programmatic authorization are__and __

isCallerInRole(identity role)/ getCallerIdentity()

The methods available for programmatic authorization are __ and __

isCallerInrole(identity role)/ getCalledIdentity()

As per EJB specifications every client application accessing an EJB system should be associated with a__object

java.security.Identity

The JDBC classes are present in the ______ package.

java.sql

Java 1.4 or higher supports regular expressions with Sun's ???????????? package.

java.util.regex

A create() method may throw ___ exception

javax.ejb.CreateException

107. All the remote interface types extend the ___ interface

javax.ejb.EJBObject

All the remote interface types extend the__interface.

javax.ejb.EJBObject

The Access Control does not take care of :

lient?s identities

class implement fifo queue link list

link list

Generally, ___ object do not implement any interfaces

local

Generally, ________________________ objects do not implement any interfaces.

local

Generally, local objects do not implement any interfaces.

local

The empty operator in EL language returns true value for null, empty Strings, empty arrays, and empty collections.

null, empty Strings, empty arrays, and empty collections

According to EJB 2.0 Specification, enterprise beans are restricted from performing certain operations.

managing threads

163. The conversation with the client ___ be lost, due caching of client conversation, while using stateful session beans

may

What would be the output from this code fragment

message four

which statements correct about message-driven bean

message-driven bean stateless

which statement is correct about message-driven beans

message-driven beans stateless

void callMe(String? names)

method, names is an array

95. The drawback of traditional n-tier architecture is ______ [2.0]

middle tier consists of one application object.

The bean instance can service ___ finder methods while in the pool

multiple

The bean instance can service ___________________ finder method/s while in the pool.

multiple

___ EJB class/es may be installed on a single container

multiple

Which methods return an enum constant?s name

name(), toString()

135. Binding is an association of a ___ with a/an ___

name/object

Binding is an association of a__with a/an __

name/object

In JNDI, binding is an association of a ________________ with a/an _____________

name/object

access modifier allows you to access method calls in libraries not created in Java

native

new class Foo { public int bar() { return 1; } }

new Foo()

void doSomething() throws IOException, EOFException

ngan-dai nhat, throws EOFException

Values used in font-weight are

normal//bolder//lighter

8. Why will the following XML code not be rendered by a browser? <name> <lastname>Dowdy</lastname> <firstname>Howdy</firstname> </lastname>

not closed properly.

#create() method of entity bean home interface returns ______

null

ejbCreate() method of entity bean class returns ______

null

5. How many deamon threads are there in Java multi-threading which you can set in a process ?

one and only one

Stateful session beans are dedicated to _______ client/s and have a preset _____________ period.

one/timeout

The code compiles, and prints out >>null<<

out >>null<<

Line 12 will not compile, because no version of crunch() takes a char argument

output: int version

Name the implicit variable to JSP pages that may be used to access all the other implicit objects

pageContext

2. HTML tags normally come in _____

pairs, start tag end tag

HTML tags normally come in

pairs, start tag, end tag

175. Entity beans are called ___ object

persistent

URL referring to databases use the form

protocol:subprotocol:datasoursename

protected class Cat extends Owner

public class Cat extends Pet

8. Which is a definition of a static method?

public static void MethodA()

void doSomething(int a, float b)

public...(int a, float b)

The _ is responsible for unicast point-to-point invocation

remote reference layer

The ________ supports communication between the stub and skeleton.

remote reference layer

Which retrieves all cookies sent in a given HttpServletRequest request?

request.getCookies()

The __ represents storage from where one can read and write

resource

The HTTPServletResponse interface has the following methods (Select two)

response.encodeURL() & response.encodeRedirectURL()

What keyword is used to jump out of a try block and into a finally block?

return

When the content is set to "eltOnly," the order defaults to:

seq

The primary key class has to be

serializable

The primary key class has to be __________.

serializable

The container along with all its interfaces resides in the ___________________

server

JSP is a ___________ running on web server

server side script language

Select incorrect statement about Socket class

server through UDP

Consider the following descriptions:

service

see the extract from web.xml below http://myserver:8080/mywebapp/bserverlet.html

servletA

given five servlets with <load-on-startup> value set as follows

servletb will load before servletc

which of the following methods derive from the servletconfig interface

servletcontext+string getinit..+string getservletname()

The page, request, session, or application object in JSP has some methods

set attribute , get attribute , remove attribute

To associate an entity bean with a particular context, a call is made to __________.

setEntityContext(EntityContext ctx)

The J2EE platform provides__benefits

simplified architecture development

The HttpServletResponse lets you:

specify outgoing information..,obtain a PrintWriter..,specify response headers..

Conversation data between client and EJB is used for___

state maintenance

Method calls by the client, to the remote object leads to an invocation of a method on the _____which in turn passes control to the _________ layer.

stub/underlying

The entity bean instance implements ____________________ callback method/s, when it is in a pool.

two

Which JDBC processing model that requires a JDBC driver that can communicate with the particular data source being accessed

two-tier

JDBC supports ______ and ______ models

two-tiers and three-tiers

The element 'element' includes the attributes:

type // MinOccurs // MaxOccurs

14. When you test a web service, what do you expect to see as output?

web proxy.

what will be the outcome.. public class nameservlet extends httpservlet {.. out.write(getservletname());}

will not compile for some other reason

When the user attempts to close the frame window, _______ event in generated

window closing

what is the most likely outcome.. String[] values = request.getheaders("bogusheader")

won't run: 2 compilation errors;

3. Which command-line tool will create a web service proxy?

wsdl.exe

1. What must be done before you can consume a web service?

wsdl.exe utility.

34 . Can a Web service use HTTPS

yes


Related study sets

English: Tale of Two Cities- Chapter 9-24 (Book 2) + Chapter (Book 3)

View Set

Chapter 7: Retention and Motivation

View Set

Module 4. Evaluating Employee Performance

View Set

Intermediate Finance -- Chapter 15

View Set

Chapter 5: Nationalism and Populism

View Set

7. French Mercantilism and Colonial Rivalry

View Set

Managerial Accounting Test #3 Review

View Set