File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

interfaces

 
roshni bhagat
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if the superclass implements a particular interface, does the subclass have to implement that interface separately or it is implemented automatically?
 
Mark Newton
Ranch Hand
Posts: 129
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May I suggest that you try it, and see what happens? That way you're much more likely to remember next time!
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy roshni bhagat ,

Welcome to JavaRanch

As David pointed out, you can better try with a small program.

Hint: You have an interface and a superclass implementing it! Then your subclass does have the methods in it or not? Keyword: Inheritance!

Try it in a small program and let us know what you get!
 
roshni bhagat
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the answer...IT's INHERITANCE !!!

Thanks
 
camilo lopes
Ranch Hand
Posts: 202
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. if your superclass no is abstract and implements the interface tha your subclass no need the methods of interface.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic