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
Get step-by-step solutions from verified subject matter experts
