Win a copy of Machine Learning Systems: Designs that scale this week in the Scala forum
or Xamarin in Action: Creating native cross-platform mobile apps in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Changing the interface  RSS feed

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I'm wondering if it's ok to change the interface provided by SUN.
I'm thinking of throwing an LockException on method lock together with RecordNotFoundException. This because I'd like the user to get more info about what went wrong while trying to lock a record. Now is that allowed or is the interface a don't touch just do kind of thing
 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No! Unless it is stated otherwise in your assignment. You have to implement the interface as it is provided.
 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You cannot change the interface, but if you launch a new not checked exception (extending RuntimeException for example), you can add a new required exception without changing the interface.

Cheers,

Iv�n
 
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!