aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Data class with package (default) access vs public Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Data class with package (default) access vs public" Watch "Data class with package (default) access vs public" New topic
Author

Data class with package (default) access vs public

David Fishman
Greenhorn

Joined: Dec 28, 2003
Posts: 18
Hi all,

In the interest of hiding the data access details from the GUI client I have created an adapter interface and class as already discussed in many threads. In addition, I am thinking of changing the access to the Data class from public to package (default), so that the only methods accessible to the GUI client would be the adapter ones.
I have actually seen this suggested in previous threads, with some warnings that this may not be acceptable (though I can not see any "musts" being violated by this), or that Sun's automated checking actually expects the Data class to have public access and would fail the submission otherwise.
Has anyone implemented the above and passed, or knows of other people's experience ?

Thanks
David Fishman
Greenhorn

Joined: Dec 28, 2003
Posts: 18
To all who are interested, I actually emailed Sun regarding this and they replied that it is acceptable for the Data class to have default access.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Data class with package (default) access vs public