created: 07/03/2019


Chapter 130 Programming Exercises


Exercise 1 — More Nodes

Modify the program ChainMaker on page 10 so that it creates many more Nodes and links them into a list. The traversal part of the program should work without modification.

Click here to go back to the main menu.


Exercise 2 — Node Number

Modify the program LinearSearch on page 13 so that it searches for a value entered by the user and the either says that the value is not in the list, or says which node contains the value. The first node in the list is node one, the next is node two and so on.

Click here to go back to the main menu.


Exercise 3 — Search for a String

Modify the program StringNodeTraverse so that it searches the list for a string entered by the user and says if the string is in the list or not. Use the equals() method of String

Click here to go back to the main menu.



End of the Exercises