File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Can i modify the interface sun providing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Can i modify the interface sun providing" Watch "Can i modify the interface sun providing" New topic

Can i modify the interface sun providing

woo hwang

Joined: Dec 13, 2006
Posts: 23
Hi all,

I have a question about the Interface Sun provided.
When I implements RMI, I reliased that i need to thorw RemoteException for all method in the SUN provide interface.

What i am wondering is that can i change interface??
can i throw more exceptions in the sun provided interface?

satishkumar janakiraman
Ranch Hand

Joined: May 03, 2004
Posts: 334
The one of the must conditions is the original interface should not be altered. You can extend the interface and throw your own exceptions and rmi exceptions.
Justin Rundle
Ranch Hand

Joined: Mar 26, 2008
Posts: 123

Simply... No. I mean if you add custom exceptions then you are now programming to an implementation rather than an interface (if you are confused or unsure or never ehard that OO principle, I can suggest Head First Design Patterns).
[ November 30, 2008: Message edited by: Justin Rundle ]
I agree. Here's the link:
subject: Can i modify the interface sun providing
It's not a secret anymore!