Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9257935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:16:06+00:00 2026-06-18T12:16:06+00:00

All Collections implements interface Collection , these collection have specific abstract hierarchy e.g. AbstractCollection

  • 0

All Collections implements interface Collection, these collection have specific abstract hierarchy e.g.

  • AbstractCollection -> AbstractList -> ArrayList
  • AbstractCollection -> AbstractSet -> HashSet

But there are also corresponding interfaces like Collection, List, Set. These interface seem to me kind of redundant.

Why are they here ? Is is just convention or is there a reason to just implement interface and not extend the abstract class.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:16:07+00:00Added an answer on June 18, 2026 at 12:16 pm

    The interfaces are there because it’s good to be able to assign a type to a variable or parameter without imposing an implementation.

    For instance if I create a persistent entity to use in Hibernate, and it has a collection of things, I want to assign a type of List or Set to that. Hibernate will swap out whatever list I initialize it to with its own, with some Hibernate-specific implementation that does lazy-loading or whatever else it needs to. The Hibernate developers may not want to be constrained by having to extend the abstract class.

    The abstract class exists as a convenience for implementers. The interface is a contract used by clients.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have three ObservableCollections: CharacterCollection, LocationCollection, and ItemCollection. They are all collections of objects;
I have a an array of observable collections and I want to display all
We have hundreds of document libraries, spread all throughout various site collections in a
I have a collection where all form data is stored, each form with a
I have a Collection<T> . I have a class TManager implementing an interface UManager
I have a collection of Animal objects. My core code wants to treat all
I have a Backbone collection with a load of models. Whenever a specific attribute
I have created a custom generic queue which implements a generic IQueue interface, which
I have a class Data which implements Serializable interface. This class has such fields
How to find names of all collections using PyMongo and find all fields in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.