×

Java Programs

Java Practice

Java LinkedList Programs

In Java programming language, the LinkedList is a class that uses a doubly linked list to store the elements. The LinkedList class provides a linked-list data structure. It inherits the AbstractList class and implements List and Deque interfaces.

This section contains the solved programs on Java LinkedList, practice these programs to learn the concept of Java LinkedList class. These programs contain the solved code, explanation, and output used in the Java LinkedList programs.

List of Java LinkedList Programs

  1. Java program to create a simple linked list using LinkedList collection class
  2. Java program to remove an item from LinkedList collection
  3. Java program to add an item into LinkedList collection on the specified index
  4. Java program to add LinkedList collection into another LinkedList collection on the specified index
  5. Java program to add LinkedList collection into another LinkedList collection in the end
  6. Java program to insert an element at the beginning of the LinkedList collection
  7. Java program to insert an element at the end of the LinkedList collection
  8. Java program to remove all items from LinkedList collection
  9. Java program to check whether an item exists in the LinkedList collection or not
  10. Java program to get the first element from the LinkedList without removing it
  11. Java program to get the items from LinkedList collection using the index
  12. Java program to get the first item from LinkedList collection using getFirst()
  13. Java program to get the last item from LinkedList collection using getLast()
  14. Java program to get the index of the first occurrence of the specified item from LinkedList collection
  15. Java program to get the index of the last occurrence of the item from LinkedList collection
  16. Java program to iterate linked list elements from the specified position
  17. Java program to store different types of items in the linked list
  18. Java program to add an item to the tail of LinkedList
  19. Java program to add an item at the front of LinkedList
  20. Java program to insert an item at the last of LinkedList using the offerLast() method
  21. Java program to get the head item from the LinkedList without removing it
  22. Java program to get the last item from the LinkedList without removing it
  23. Java program to retrieve and remove the head item from the LinkedList
  24. Java program to retrieve and remove the tail/last item from the LinkedList
  25. Java program to insert an item to the stack represented by the LinkedList
  26. Java program to pop items from the stack represented by the LinkedList
  27. Java program to remove the last occurrence of a specified item from the LinkedList
  28. Java program to get the size of the LinkedList collection
  29. Java program to convert a LinkedList collection to an array
  30. Java program to replace an item in LinkedList collection
  31. Java program to create a LinkedList collection of objects of a class
  32. Java program to demonstrate the spliterator() method of LinkedList


Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.