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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:10:32+00:00 2026-06-04T03:10:32+00:00

For adding an item I use public void add(Object s) { list.add(s); } For

  • 0

For adding an item I use

public void add(Object s) {
    list.add(s);
}

For deleting an item I use

public void remove(Object s) {
    list.remove(s);
}

Now for searching the LinkedList when I use the dot operator and search the built in API I do not see anything that would suggest a search function. Would it be contains?

  • 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-04T03:10:34+00:00Added an answer on June 4, 2026 at 3:10 am

    Since it seems you want to know where the item is placed in the list so you can access the actual instance found, you want to use indexOf to find it and get to return the found instance. There is no method that combines the two.

    List list = ...
    Object item = ...
    int index = list.indexOf(item);
    if (index > 0) {
        Object found = list.get(index);
        ...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I add a new object item to a Main Views model that
I am having a difficulty adding an item to my listbox. I want to
I see a couple of previously answered questions about adding an item to an
I am writing a view controller for adding a new item to my app.
I'm adding a custom context menu item to documents (and not folders) in a
After adding <item>170,000</items> to string.xml . It becomes so slow in building workspace, I
I'm having a little problem changing members of an object in a list using
I have a domain object which represents a 1:n relationship between database tables. public
I'm trying to use LINQ to return a list of ids given a list
I am in need of adding an item of type IVehicle which is injected

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.