0

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

General formate for an ECL statement

  1. @LABEL:COMMAND,OPTION(S)FIELD1,FIELD2..COMMENT

  2. @LABEL:OPTION(S)FIELD1,FIELD2,COMMAND..COMMENT

  3. @LABEL:OPTION(S)FIELD1,FIELD2,..COMMENT,COMMAND

  4. @COMMAND:LABEL,OPTION(S)FIELD1,FIELD2..COMMENT


Correct Option: A
  1. ACCEPT

  2. MOVE

  3. FIND

  4. STRING


Correct Option: C
  1. SEU12ABC

  2. TXI14IJK

  3. PHR10XYZ

  4. BOTH A and C


Correct Option: D

FURPUR stands for

  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

A software program supplied by Unisys that processes user runs, controls files, manages system resources, and performs input/output operations for the user is called

  1. FURPUR

  2. ECL

  3. Exec

  4. processor call control statements


Correct Option: C

According to COBOL programming standard the PROGRAM-ID

  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

Which of the following are true about an enterprise bean according to the EJB 2.0 spec?

  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

Which of the following are valid entries in the deployment descriptor?

  1. int

  2. short

  3. java.lang.Boolean

  4. java.lang.Character


Correct Option: C,D

Which of the following statements are true about locating or using the home interface of a session bean?

  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

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

A. Once acquired, the home interface can be used only once. This statement is incorrect. The home interface of a session bean can be used multiple times to create multiple instances of the session bean.

B. Each instance of a session bean has its own EJBHome object. This statement is incorrect. The EJBHome object is associated with the session bean's home interface, not with individual instances of the session bean.

C. The InitialContext must be narrowed before it can be used to get the home interface. This statement is incorrect. The InitialContext does not need to be narrowed in order to obtain the home interface of a session bean. The home interface can be obtained directly from the InitialContext.

D. Only remote clients need to get the home interface; local clients can get to the session bean directly. This statement is incorrect. Both remote and local clients can obtain the home interface of a session bean. Remote clients use the home interface to create and access remote instances of the session bean, while local clients use the home interface to create and access local instances of the session bean.

E. The local client can use the home interface to remove the bean instance. This statement is incorrect. The home interface does not provide a method for the client to directly remove the session bean instance. The removal of a session bean instance is typically done by invoking a method on the session bean itself.

F. None of the above. This statement is correct. None of the statements A, B, C, D, or E are true about locating or using the home interface of a session bean.

Therefore, the correct answer is 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

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

  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

For a session bean, which of the following are the container’s responsibilities?

  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
  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
  1. ejbCreate()

  2. ejbActivate()

  3. create()

  4. setSessionContext()

  5. getRollbackOnly()

  6. getEJBHome()


Correct Option: E,F
- Hide questions