aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Exceptions visibility Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Exceptions visibility" Watch "Exceptions visibility" New topic
Author

Exceptions visibility

Tomasz Luchowski
Greenhorn

Joined: Sep 16, 2004
Posts: 15
Hello,

I'm working on URLyBird and I am not sure what is the "right" visiblity of exceptions defined in suncertify.db. My specification says "Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package". Does "member class" mean it is a class with package-private visibility, or does it simply mean it is a class defined in given package, any does not say anything about the expected visibility?

I believe it's the latter but just wanted to make sure I don't miss anything.

Regards,
Tomasz


Tomasz Luchowski<br />SCJP, SCBCD, SCWCD, SCEA part 1
Paul Anilprem
Enthuware Software Support
Ranch Hand

Joined: Sep 23, 2000
Posts: 3335
    
    8
Originally posted by Tomasz Luchowski:
Hello,

I'm working on URLyBird and I am not sure what is the "right" visiblity of exceptions defined in suncertify.db. My specification says "Any unimplemented exceptions in this interface must all be created as member classes of the suncertify.db package". Does "member class" mean it is a class with package-private visibility, or does it simply mean it is a class defined in given package, any does not say anything about the expected visibility?

I believe it's the latter but just wanted to make sure I don't miss anything.

Regards,
Tomasz


You are right, they should just be member of the db package. Usually, business logic in implemented in another server package. Since this business package uses db layer (i.e. db package), classes (including exceptions) that form an interface (as in concept not java interface) of the db package have to be public as well.


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exceptions visibility