• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DataInterface

 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am (and I know almost every one of you is) thinking of an interface DataInterface.java which defines all the methods in Data.java, but I have a question: only public accessor is allowed in methods defined in the interface, and the methods implemented in the class should not have a weaker access than those in the interface. Then what should I do with those protected or private methods in Data.java. I doubt if we can change the signature of the given methods.
Thanks.
Cathy
 
Burk Hufnagel
Ranch Hand
Posts: 814
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DataInterface only needs to define the public methods of the Data class.
 
Cathy Young
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Burk.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic