Question
Without using Java Collections/Containers, write a program that reads/stores integers into a linked list, storing them in the order read/inserted. Add an integer in the
Without using Java Collections/Containers, write a program that reads/stores integers into a linked list, storing them in the order read/inserted. Add an integer in the list only if it isnt in the list. In addition, create a method to delete a value (node) from the list; if the value is not in the list, print out an error message stating that it was not found and continue processing. Finally, terminate insertions into the list when the sentinel -9999 is encountered and display the contents of the list. In your sample run, be sure to demonstrate insertion, deletion, and displaying the contents of the list.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started