• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JPilot,, Java ranch exam question ID: 1

 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which of the following statements about business methods in a bean class is incorrect.

A.The signature requirements for business methods are always the same for both session and entity beans.

B.The argument and return types must always be legal types for the Java RMI API.

C.The throws clause may include any exceptions defined by your application.

D.A business method should always throw the javax.ejb.EJBException to indicate a system-level problem.

Correct answer was B.

why the statement at B is incorrect?
And I think the statement at C is incorrect, so C should be correct answer. Since the throws statement can not include "any exceptions defined by your application", just the ones that are not runtime exception and which do not extend java.rmi.RemoteException.

Miki
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The throws clause may include any exceptions defined by your application


This means the exceptions defined by your application {application exceptions} which can be defined in the throws clause.

The argument and return types must always be legal types for the Java RMI API


NOT for local client view.


sawan
 
Miki Muzsi
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok. I agree. Tricky question

Thanks.
Miki
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic