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 874523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T11:06:59+00:00 2026-05-15T11:06:59+00:00

For all the methods in Collections that take a List as their first argument,

  • 0

For all the methods in Collections that take a List as their first argument, why aren’t those methods simply part of the List interface?

My intuition is: given a List object, that object itself should “know” how to perform on itself operations such as rotate(), shuffle(), or reverse(). But instead, as a Java programmer, I have to review both the methods in the List interface, as well as the static methods “over there” in the Collections class, to ensure I’m using a canonical solution.

Why were some methods placed as static standalone methods in the Collections class, instead of being added to the List interface (and presumably thus implemented by some existing or would-be base class)?

I’m trying to better understand the design decisions behind the Java collections framework.

Is there some compelling OO design principle here that I’m overlooking? Or was this distinction done simply for some practical, performance reason?

  • 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-05-15T11:06:59+00:00Added an answer on May 15, 2026 at 11:06 am

    The point is that given suitable primitive operations (remove, set etc) a bunch of more high level operations (sort, shuffle, binary search) can be implemented once rather than being implemented by every single list implementation.

    Effectively, java.util.Collections is like .NET’s Enumerable class – full of general purpose methods which can work on any collection, so that they can share a single implementation and avoid duplication.

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

Sidebar

Related Questions

Twitter has deprecated the use of all methods that use DELETE as a request
While reading this class BitmapFactory I noticed that almost all methods inside are static.
I have a class named CommonCode that is used for stocking all methods I
The android.jar found in android-sdk is simply a stub. All methods will throw a
What's the shortest, one-liner way to list all methods defined with attr_accessor ? I
remove() method without any argument removes all documents inside the collection. $this->db->$collection->remove(); But how
If I have child class,the child class inherits all methods from the parent,but how
I use Eclipse JDT library to parse java source code to visit all methods
On my previous job, providing all methods with javadoc was mandatory, which resulted in
I understand that predicates are delegate to function which return bool and take generic

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.