Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

DBMain question  RSS feed

 
dongmei Liu
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could I add any other method to �interface DBMain.java�, instructions only said �must implement the following interface�,so I thought ought to add.
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by dongmei Liu:
Could I add any other method to �interface DBMain.java�, instructions only said �must implement the following interface�,so I thought ought to add.


If that's the interface supplied by Sun, you shouldn't make any changes to it other than to reformat the comments.
 
Hanna Habashy
Ranch Hand
Posts: 532
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dongmei,
I recommend that you don't change or add anything to the interface given to you by SUN. However, you can add any additional methods in another intrface, and you can implement the two interfaces, the one given by Sun and the one you created. Also, you can add any addintionl methods directly inside your class, without being in any interface.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!