wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Package for mandatory exceptions class 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 "Package for mandatory exceptions class" Watch "Package for mandatory exceptions class" New topic
Author

Package for mandatory exceptions class

Fernando Franzini
Ranch Hand

Joined: Jan 09, 2009
Posts: 486
    
    2

HI for all jRanchers

My assignment say:
Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package.......

It's doen't mean that I can't put this exceptions classes inside another inner package inside suncertify.db ? like suncertify.db.exception
Regards.


Fernando Franzini - Java Blog
Roel De Nijs
Bartender

Joined: Jul 19, 2004
Posts: 5131
    
  12

Fernando Franzini wrote:
It's doen't mean that I can't put this exceptions classes inside another inner package inside suncertify.db ? like suncertify.db.exception


If you put these exceptions in suncertify.db.exception, you will fail automatically. So don't do it If you run my test case to validate your submission jar 1 of the tests is a check to see if these exceptions are in the correct package, suncertify.db that is.

If you create another own exception (not mentioned in the provided interface), you can put that one in every package you want (but of course it would be normal to put that one in the suncertify.db package too).

Kind regards,
Roel


SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
http://www.javaroe.be/
Fernando Franzini
Ranch Hand

Joined: Jan 09, 2009
Posts: 486
    
    2

Hi Roel

Ok...thanks again for the fast answer
Fernando Franzini
Ranch Hand

Joined: Jan 09, 2009
Posts: 486
    
    2

At least can I create anothers packages inside suncertify.db.xxxx ? like remote...local...
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

Fernando Franzini wrote:At least can I create anothers packages inside suncertify.db.xxxx ?


Surely. As long as everything that must be in a particular place is in that particular place, it's fine.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Fernando Franzini
Ranch Hand

Joined: Jan 09, 2009
Posts: 486
    
    2

particular place


I mean inside suncertify.db.xxxx like...
suncertify.db.local - > create class provide local acess
suncertify.db.remote -> create class provide remote acess

Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

Yes, Fernando! You can certainly create other packages inside your suncertify.db package. But for instance, you still must create the Data class inside your suncertify.db package so you don't get automatically failed. So, as long as everything that must be in a particular place is in that particular place, it's fine.
Fernando Franzini
Ranch Hand

Joined: Jan 09, 2009
Posts: 486
    
    2

Thanks Roberto
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Package for mandatory exceptions class
 
Similar Threads
Possible to create exceptions with full stack trace
Exceptions visibility
SecurityException
I am close to submit - Quetion a bout how to package
exceptions = member classes ?