Java Programming Tutorial 74 – Searching a List for Custom Objects

///Java Programming Tutorial 74 – Searching a List for Custom Objects

Java Programming Tutorial 74 – Searching a List for Custom Objects

FavoriteLoadingAdd to favorites

Sign up for Pramp (FREE) –

Java468x60

Enjoy my content? Subscribe for free! –

C# Course –

My Dev/Entrepreneurship show –

Want to learn code? Try Pluralsight for free –

Need help getting a job? –

My recommended Web Hosting –

Amazing BenQ Lamp –

Instagram –
Twitter –
Facebook –
More content –
Patreon –

source

By |2020-10-23T10:06:14+00:00October 23rd, 2020|Java Video Tutorials|9 Comments

9 Comments

  1. John Ryle .Singh October 23, 2020 at 10:06 am - Reply

    I still get -1 even I do those changes. I cant type .strip(); because my eclipse is old. What should I do?

  2. Victor3109 October 23, 2020 at 10:06 am - Reply

    Is line 51 why do you still need to call the .getFullName() method?

  3. selim hasan raj October 23, 2020 at 10:06 am - Reply

    would you mind making videos on "Generic,Comparable Generic,Parameterized Types? Thank you

  4. ranbir kumar October 23, 2020 at 10:06 am - Reply

    Can i get the source code

  5. Jx_cob October 23, 2020 at 10:06 am - Reply

    We are pretty much accessing the second searchList method by calling the first one, you can make the second searchList(List, String fullname) private and the code still executes fine.
    Cool.

  6. Kawa Bata October 23, 2020 at 10:06 am - Reply

    I had trouble understanding the invoking of the overload, but I figured it finally out and wrote it for you guys, who might have the same issue:

    What happens here is that in the method (line 43) we are invoking overload that starts on line 47.
    We do that by combining the fn and ln in line 44. Why? Because the overload expects a string of FULL NAME! But in the method (line 43), it only has names separately, so it does not concatenate them!
    So, whenever you say that “hey, take the first name and ADD it to the last name” , you are automatically invoking the overload, since it has it in the argument. What happens then is that we are running the code that has the for-if statement, which iterates over the indexes and checks if the fullName is equal to the getFullname and returns the index where this match happened.

    Hope it helps someone!

  7. Bolton October 23, 2020 at 10:06 am - Reply

    I didn`t understand anything. You are not good at explaining, try harder

  8. Rafael Angelo Piad October 23, 2020 at 10:06 am - Reply

    Dis helped us wid our programming activity 👍♥️

  9. Faizan Shaikh October 23, 2020 at 10:06 am - Reply

    How to do this without iterating over complete arraylist. I was asked this questn in an intrvw today.

Leave A Comment

*