Multiple choice technology programming languages

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.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The method signature shows RemoteException in the throws clause, which is only present in remote interfaces (local interfaces don't throw RemoteException). The create method with parameters can be used by stateful session beans to initialize state during creation, whereas stateless session beans typically have no-arg create methods.