Black Friday Sale Special - Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sntaclus

Which of the following elements are the subelements of the mime-mapping element in a deployment descriptor file?

Each correct answer represents a complete solution. Choose all that apply.

A.

exception-type

B.

error-code

C.

extension

D.

mime-type

E.

servlet-class

Which of the following methods is used to request that any pending finalizers be run for objects eligible for garbage collection?

A.

freeMemory()

B.

gc()

C.

runFinalization()

D.

runFinalizers()

Mark works as a Programmer for InfoTech Inc. He wants to develop a JMS API application that is used as a messaging service application. He writes the following createSession() method.

session = connection.createSession(false, 2);

Which of the following statements are true about the syntax?

Each correct answer represents a complete solution. Choose all that apply.

A.

The client acknowledges a consumed message by calling the message's acknowledge method.

B.

The acknowledge method can reduce session overhead by minimizing the work the session does to prevent duplicates.

C.

This method instructs the session to lazily acknowledge the delivery of messages.

D.

The session automatically acknowledges a client's receipt of a message.

E.

If a message consumer consumes eight messages and then acknowledges the fourth message delivered, all eight messages are acknowledged.

Given below are top-level class declarations. Which of these class declarations would not produce a compile-time error?

abstract class P {} //1

private class Q {} //2

static class R {} //3

transient class S {} //4

A.

Line 3

B.

Line 1

C.

Line 2

D.

Line 4

Mark works as a Programmer for InfoTech Inc. He develops a session bean class named

accountService. Which of the following rules must be conformed by the session bean class?

Each correct answer represents a complete solution. Choose all that apply.

A.

It can be used without the @Stateful or @Stateless annotation.

B.

It must implement the business methods defined in the business interface.

C.

It can implement any optional business method annotated by the @Remove annotation.

D.

It must have a public constructor that takes a string as its parameter.

E.

It requires helper classes to meet the needs of an application.

Mark works as a Programmer for InfoTech Inc. He develops a Java application that uses the encryption and compression techniques. Which of the following interfaces will he use to control the serialization and deserialization processes?

A.

Flushable

B.

Closeable

C.

Serializable

D.

Externalizable

Mark works as an Application Developer for XYZ Solutions Inc. He writes the following code.

public class TestDemo{public static void main(String[] args){

{try{int x =0;int d= 5/x;}catch(Exception ex){System.out.println("Exception");}

catch(ArithmeticException ae){System.out.println("Arithmetic Exception");}}}

What is the result when Mark tries to compile and execute the code?

A.

Exception

B.

An exception is thrown at runtime.

C.

Compilation fails.

D.

Arithmetic Exception

Which of the following fields must be present in the login page when using the form-based

authentication?

Each correct answer represents a part of the solution. Choose two.

A.

j_login

B.

j_password

C.

get_pw

D.

j_pw

E.

j_username

F.

user_pw

Which of the following options are available with jar files?

Each correct answer represents a complete solution. Choose all that apply.

A.

M - Deletes an existing manifest file

B.

c - Creates a jar file

C.

o - Overrides an existing jar file

D.

0 - Stores a file without using zip compression

E.

m - Manipulates or updates an existing jar file

F.

u - Unzips a jar file

G.

M - Creates a manifest file

Which of the following are valid code samples for creating file permissions?

Each correct answer represents a complete solution. Choose all that apply.

A.

FilePermission per = new FilePermission("-", "read, execute");

B.

FilePermission per = new FilePermission("<>", "read");

C.

FilePermission per = new FilePermission("file1", "read, write");

D.

FilePermission per = new FilePermission("/bin/*", "execute");

E.

FilePermission per = new FilePermission("/tmp/myfile", "read, delete");

F.

FilePermission per = new FilePermission("/*", "read");