Java Video Tutorial 12

Code Here:

Best Java Book :

In this part of the Java Video Tutorial I cover Java Linked Lists. The LinkedList class is a collection based on a linked list instead of an array like the ArrayList. They are good when you plan to add and delete items. They aren’t particularly efficient at providing access based off of index searches though.






29 responses to “Java Video Tutorial 12”

  1. Anuj Patel Avatar

    Your videos are amazing and extremely easy to understand! i really appreciate you uploading this video for us.
    If it possible would you also explain the implementation of Linked List, stack, queue, BST, Hashmap and etc???
    I would like to get more indepth understanding! if its not too much to ask.

  2. BLUENINJA750 Avatar

    this seems very similar to array lists and when i looked it up online on most people said to make arraylists as your default and use linked lists only in certain situations so I'm guessing that is why you taught array lists first?

  3. alberto cassio Avatar

    "LinkedList will have access to all the methods in the LinkedLink class" How to see a listing of all available methods in LinkedLink or any other Imported classes?

  4. Ethan Dodge Avatar

    Wouldn't it be correct to use the function isEmpty() to check if an array list has any elements instead of using peek()?

    because peek returns the first element in a list if there is one present, while isEmpty() returns a boolean


  5. Ethan Dodge Avatar

    Personal Bookmark
    8:16 – peek()

  6. Sohail Khan Avatar

    Derek sir What is difference between ArrayList and LinkedList i mean advantage of LinkedList over ArrayList

  7. krughan henderson Avatar

    Thanks for all your work, knowledge, time and the way you deliver… wow…. thank you…… your videos cleared up a lot of stumbling blocks in my mind …. thanks

  8. Little Maggot Avatar

    wait,why do you need to have () like in LinkedList()?

  9. Alaa Lahmar Avatar

    Your awesome man , thank you , i really appreciate your work and effort

  10. ASIYA SULTANA Avatar

    I really like the videos and I admit that these videos have helped me a lot. Thank you Derek Banas.
    Can you please make videos separately on Java collections and their applications? It would help me lot.

  11. Janina Krüßmann Avatar

    I thought I would not be able to learn how to program.. turns out I just needed to find someone who can teach!
    Love your tutorials, creative, great presentation, instruction is to the point, your style of speech is unique. You instruct with calmness and confidence, which inspires a "I can do this!" mentality in the hearts of the people you teach. (At least, for me.)

    Overall perfect combination, makes the material very accessible and facts easy to memorize.

    Thank you, Derek! o/

  12. Stéfano Lazzari Avatar

    where do you get all this names from? So creative hahahahaha

  13. Shumaila Shaikh Avatar

    Sir your videos are just amazing !!!!! It always makes me so eager to learn so much …

  14. Youssef Samwel Avatar

    derek can you turn an array to array list or linkedlist

  15. Voignar Avatar

    Derek do you write scripts for your tutorials or do you improvise?

  16. Ralph Blach Avatar

    below is the code which I have written and I get an error on the enhanced for loop.

    LinkedList linkedListOne = new LinkedList();
    LinkedList names = new LinkedList<String>();

    names.add("Ahmed Bennani");
    names.add("Ali Syed");

    for(String name : names) //type mismatch, cannot convert object to string.


    I am using a raspberry pi with the following jdk
    java version

    pi@raspberrypi ~ $ java -version
    java version "1.8.0_65"
    Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
    Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

    Any comments


  17. Jitesh Narula Avatar

    Dear Sir ,

    1. How i can Insert the values somewhere in the middle of LinkedList using Push method?

    2. What is the difference between Stack and ArrayList

    Sir Please Reply:-)
    Thank You !

  18. Ali Eren Çelik Avatar

    So.. LinkedLists are the same as ArrayLists ???

  19. Vikas Yadav Avatar

    how the name "ahmed binnani" get deleted when we do names.set(2,"paul newman");?????

  20. tohtorizorro Avatar

    How is the addLast method different from the plain add method?

  21. alias40anon Avatar

    So these brackets [ ] or ( ) next to an object just means that there will be values related to the object (inside the object in case of arrays or LinkedLists. Is this obligatory? I mean an array with nothing next to it, it will do no function at all?

  22. Pj Cohen Avatar

    when i run the program it doesn't print out to screen for some reason, like there is no error but for some weird reason it is just doesn't show anything. do you know why or how can i fix it?

  23. Abdulnaser Sheikh Avatar

    I have a crawler. it has Spiders. they share Queue links(LinkedList) and Crawled(HashSet). Totals spiders are 1000. When i run the program i get a error indexOutofBoundry, or noSuchElement. I did research on google and stockoverflow and i came to a conclusion of the linkedlist are slow and they need 30 millionsecond to resize, but my spiders are extracting data every 12 millionsecond. Do you have any alternative ways to store Queue links?

  24. Emir Kurtanovic Avatar

    In `LinkedList<String> names = new LinkedList<String>();` – you don't need that "second" <String>. It is automatically implied, so you can just put … `new LinkedList<>();`

  25. Rishi Swethan Avatar

    when i give
    String name: names;
    outside the loop, can i know what happens to the variable 'name' when i simply print it as a string without a loop? pls explain…

  26. Zachary Kirby Avatar

    Just curious, is there a difference between add() with no index argument and addLast()?

  27. Gai Cheng Avatar

    I dont know what Object is. Is Object a dataType like int and double?

  28. Muhammad Risfahuddin Avatar

    please make list of your video tutorial , that's can help us for index your video
    anyways thans for the tutoria;

Leave a Reply

Your email address will not be published. Required fields are marked *