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

  • Home
  • SEARCH
  • 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 8659935
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T16:07:44+00:00 2026-06-12T16:07:44+00:00

Instead of using traditional polymorphism … extends LinkedList<T> , is there a way to

  • 0

Instead of using traditional polymorphism ... extends LinkedList<T>, is there a way to overload on a class such as String, List or a custom MyClass class, in Java?.

theList.doRandomShuffle(123); or theList.persistOnFile("fileName");

Mixing C code to achieve this is on the table if possible. Any further suggestions will be useful.

UPDATE: OK. String class was not a good example. The purpose was to extend a class without declaring a new list MyList extends LinkedList<T> or creating a utility class for the wanted function. I am eliminating two possibilities of extension to achieve and asking if there is more option even if it is hardcore.

The reason beyond this is to question if possible to extend classes especially for jar libraries without adapting to the new extended classes of LinkedList impl. whatsoever. I am really disappointed by the community that no one knows for sure, thinks even questioning should be out of the box

  • 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-12T16:07:46+00:00Added an answer on June 12, 2026 at 4:07 pm

    In Java, you cannot add a method to an already defined class such as String. However, if the class is not final, you can extend it to create custom methods.

    (Technically, you can add methods to defined classes, but it’s a hassle and would be a breach of Java’s terms and conditions of use.)

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

Sidebar

Related Questions

What do you think about the concept of using ORO instead of traditional Garbage
Instead using of: if ( ! $('#XX').is(':visible) ) Is there a value called invisible
We are using symfony 1.4 on our development machine traditional way to cache partial
I am using the validationengine with .NET so don't use the traditional class=validate[required] on
Instead using the google search appliance crawler for index content, im using a query
Instead of using an interface like this: public interface IStartable { void Start(); void
Instead of using an external web-based Mercurial host, I want to set one up
instead of using getParameterByName('Field', PostData) (PostData == $('form').serialize();) I would like to write PostData.Field,
I am using jQuery with ASP.NET in a project. Instead of using ASP.NET Ajax,
Can I authenticate with just Google account username and password instead of using OAuth?

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.