• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

JPilot,, Java ranch exam question ID: 1

 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok. I agree. Tricky question

Thanks.
Miki
 
Bring out your dead! Or a tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic