Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

mock question  RSS feed

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which exception is thrown when remote client tries to call remove() on a bean thats already been removed?

1) NoSuchObjectException
2) RemoteExcption
3) IlligalStateException
4) NoSuchEntityException

Whether both (1) and (2) are correct, or ONLY (1) is correct?

Thanks,
Prashant
 
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the question asks about selecting one option then first one is correct.

On the other hand one and two both are correct.

1) NoSuchObjectException
2) RemoteExcption

The container doesn't guarantee that the client will get NoSuchObjectException a remote client may get RemoteException.

Hope it helps.
 
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Parshant, i had the same question: see here

Miki
 
I knew I would regret that burrito. But this tiny ad has never caused regrets:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!