• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

class implementing an interface

 
Ranch Hand
Posts: 386
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does ArrayList extend another class, which already implements some methods from the List interface ?
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Deleted]
 
Marshal
Posts: 80956
522
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
We don't have time for this. We've gotta save the moon! Or check this out:
Clean our rivers and oceans from home
https://www.kickstarter.com/projects/paulwheaton/willow-feeders
reply
    Bookmark Topic Watch Topic
  • New Topic