aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S: Adding methods to Data that are not in  DBMain 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 "B&S: Adding methods to Data that are not in  DBMain" Watch "B&S: Adding methods to Data that are not in  DBMain" New topic
Author

B&S: Adding methods to Data that are not in DBMain

Eric Alex
Greenhorn

Joined: Mar 18, 2008
Posts: 1
Hiya,

My Data class implements all the methods that are specified in the DBMain interface. I've also added some other methods to the class that I feel that I need like:
getNumberOfFields()
getFieldNames()

Question: Is this ok or is the Data class ONLY supposed to contain the methods specified in the DBMain interface?
Mike Ottinger
Ranch Hand

Joined: Jan 11, 2002
Posts: 125
Hi Eric,


SCJP 1.4 SCJD 1.5
Mike Ottinger
Ranch Hand

Joined: Jan 11, 2002
Posts: 125
wooooops!

Hi Eric,

I added 2 additional public and 2 additional private methods to my implementing class. No problems with that at all. I would NOT add these method declarations to the supplied interface, though. Leave that untouched. Hope this helps.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: B&S: Adding methods to Data that are not in DBMain