0

programming languages Online Quiz - 1

Description: programming languages Online Quiz - 1
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/18 Correct 0 Score 0
  1. Http Redirects

  2. Hidden Variables

  3. Cookies

  4. Rewritten URLs

  5. Using HttpSession Interface


Correct Option: A

The variables local to the methods like service(), doPost() and doGet() are thread safe. True/False?

  1. True

  2. False


Correct Option: A

You want to use URL rewriting to support client browsers, which do not use cookies. Which method will you use to attach the session id to a URL that is to be used for the sendRedirect() method of the HttpServletResponse?

  1. encodeURL

  2. encodeRedirectURL

  3. encodeSessionURL

  4. encodeSessionRedirectURL

  5. None of these


Correct Option: B
  1. The bean method is throwing a checked exception and is configured with a transaction attribute of "Required".

  2. The bean method is throwing an unchecked exception and is configured with a transaction attribute of "Required".

  3. The bean does not throw an exception but is configured with a transaction attribute of "Mandatory".

  4. The bean method is throwing an unchecked exception and is configured with a transaction attribute of "Requires New".


Correct Option: B

Which enterprise bean type is defined without any client view interfaces?

  1. BMP Entity bean

  2. CMP Entity bean

  3. Stateful Session bean

  4. Stateless Session bean

  5. Message Driven Bean


Correct Option: E

Which of the following is NOT an advantage of using the SessionFacade pattern?

  1. Hides model complexity from the client

  2. Reduces network traffic

  3. Provides a simple interface to the client

  4. Enables the client to control transactions


Correct Option: D

Which method cannot be called by a stateful session bean using bean-managed transactions?

  1. getUserTransaction()

  2. getRollbackOnly()

  3. getStatus()

  4. None of these


Correct Option: B

Which of the following statements are true about the given method declaration? MyEJBObject createWithName(String name) throws CreateException, RemoteException

  1. It is declared in the local home interface of a stateful session bean.

  2. It is declared in the local home interface of a stateless session bean.

  3. It is declared in the remote home interface of a stateful session bean.

  4. It is declared in the remote home interface of a stateless session bean.


Correct Option: C
  1. Business Delegate - Reduces the coupling between presentation-tier clients and business services.

  2. Data Access Object - Multiple View using the same model.

  3. MVC - Enables easier migration to different persistence storage implementation.

  4. Value Object - Reduces Network Traffic


Correct Option: D

In Static inner classes, the data members and the member functions are by default static.

  1. True

  2. False


Correct Option: B

Annonymous Inner classes are not possible within an Interface.

  1. True

  2. False


Correct Option: B
- Hide questions