• Post Reply Bookmark Topic Watch Topic
  • New Topic

class implementing an interface  RSS feed

 
nirjari patel
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A class implementing an interface has to define all methods in an interface.

ArrayList implements List interface. List interface has 25 abstract methods. When I checked ArrayList class , it has 20 methods. Some of which may be completely new for this class. So, does this ArrayList class only contain all methods in List interface or only methods that have some code in them ?

Thanks
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does ArrayList extend another class, which already implements some methods from the List interface ?
 
saidi Bandi
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
[Deleted]
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sai Roy, please go here, where you will read this:-
We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
By providing a complete answer you are depriving nirjari patel of the opportunity to learn how to find such information for oneself.
Please don't be annoyed, but I have pulled rank and deleted the solution and explanation, NP will actually have a chance to learn how to navigate the API documentation.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!