Two Laptop Bag
The moose likes Beginning Java and the fly likes interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "interfaces" Watch "interfaces" New topic


roshni bhagat

Joined: Jan 31, 2008
Posts: 6
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

Joined: Jan 31, 2006
Posts: 129
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

Joined: Apr 20, 2006
Posts: 3381

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!

Everything has got its own deadline including one's EGO!
[CodeBarn] [Java Concepts-easily] [Corey's articles] [SCJP-SUN] [Servlet Examples] [Java Beginners FAQ] [Sun-Java Tutorials] [Java Coding Guidelines]
roshni bhagat

Joined: Jan 31, 2008
Posts: 6
I got the answer...IT's INHERITANCE !!!

camilo lopes
Ranch Hand

Joined: Aug 08, 2007
Posts: 202
No. if your superclass no is abstract and implements the interface tha your subclass no need the methods of interface.

Brazil - Sun Certified Java Programmer - SCJP 5 About Java - Update every Week.
Guide SCJP - tips that you need know
I agree. Here's the link:
subject: interfaces
jQuery in Action, 3rd edition