programming languages Online Quiz - 202

Description: programming languages Online Quiz - 202
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0




Correct Option: A

Incorrect option for @ASG statements

  1. @ASG,UP

  2. @ASG,N

  3. @ASG,AR

  4. @ASG,T

Correct Option: B

  2. MOVE

  3. FIND


Correct Option: C
  1. SEU12ABC

  2. TXI14IJK

  3. PHR10XYZ

  4. BOTH A and C

Correct Option: D
  1. File Utility Routines/Process Utility Routines

  2. File Utility Run/Program Utility Routines

  3. File Utility Routines/Program Utility Routines

  4. File Utility Run/Process Utility Routines

Correct Option: C
  1. must be atleast 8 character name

  2. must be an 8-character descriptive name

  3. must be an 8 or more character descriptive name

  4. must be an less than 8-character descriptive name

Correct Option: B

Find the incorrect:

  1. IMPART-DEPART=0,Successful IMPART

  2. IMPART-DEPART=1,Successful IMPART

  3. IMPART-DEPART=2,Successful DEPART

  4. IMPART-DEPART=0,IMPART or DEPART not happened

Correct Option: A
  1. Security management

  2. Transaction management

  3. Load balancing

  4. Fault tolerance

Correct Option: A,B
  1. A bean cannot use java.net.Socket.

  2. A bean instance variable cannot be declared static and final.

  3. A bean cannot listen on a socket as a server.

  4. A bean cannot use the java.io package.

  5. A bean cannot use this in the body of a class method.

Correct Option: C,D
  1. Once acquired, the home interface can be used only once.

  2. Each instance of a session bean has its own EJBHome object.

  3. The InitialContext must be narrowed before it can be used to get the

  4. Only remote clients need to get the home interface; local clients can get to the

  5. The local client can use the home interface to remove the bean instance.

  6. None of the above.

Correct Option: F

Assuming L and R are the local and remote clients for session bean B, which of the following are true statements?

  1. L can pass its reference for B as a return value of a method call from R.

  2. R can pass its reference for B as a parameter in a method call to L.

  3. L cannot call methods on R. Doesn’t this depend on what R actually is, and where it is located

  4. L cannot call methods on B.

Correct Option: B,C
  1. A local client can remove the bean by invoking a method on the home interface

  2. Only a remote client can use the remove() method in the component interface.

  3. A stateful session bean is created by the container when the client invokes a create() method on the home interface.

  4. A create call from a client on a stateless session bean may not result in creating any instance of the bean. The container can create stateless session bean instances before any call from the client.

  5. A remove call from a client on a stateless session bean instance results in removing the instance.

Correct Option: C,D

From which of the following methods can you call the isCallerInRole() method of the SessionContext?

  1. setSessionContext()

  2. ejbCreate() method of a stateless session bean

  3. ejbCreate() method of a stateful session bean

  4. None of the above

Correct Option: C
  1. Call ejbCreate().

  2. Implement javax.ejb.SessionBean.

  3. Implement javax.ejb.EJBContext.

  4. Implement ejbRemove().

  5. Implement setSessionContext().

Correct Option: A,C

Which of the following statements are true about a stateful session bean?

  1. An ejbRemove() call from the container removes the bean instance and puts it out for the garbage collector.

  2. An ejbCreate() call is made by the container only when a client invokes a create method.

  3. You can get the security information about a client from inside the ejbCreate() method.

  4. The container will call the setSessionContext() method only once.

  5. All of the above.

Correct Option: E
  1. ejbRemove()

  2. ejbPassivate()

  3. setSessionContext()

  4. ejbCreate()

  5. None of the above

Correct Option: C

Which of the following statements show what happens when a client invokes a session bean instance that does not exist?

  1. javax.ejb.NoSuchObjectLocalException for the local client

  2. javax.ejb.NoSuchObjectException for the remote client

  3. javax.ejb.RemoveException

  4. javax.ejb.ObjectNotFoundException

  5. java.rmi.NoSuchObjectException for the remote client

Correct Option: A,E

Which of the following methods belong to the SessionContext interface, directly or by inheritance?

  1. ejbCreate()

  2. ejbActivate()

  3. create()

  4. setSessionContext()

  5. getRollbackOnly()

  6. getEJBHome()

Correct Option: E,F
- Hide questions