Question: 2. public String toString()-returns a String containing the print value of the list. . public void removeLast()-removes the last element of the list. If the

2. public String toString()-returns a String containing the print value of the list. . public void removeLast()-removes the last element of the list. If the list is empty, does nothing. 4. public void replace(int oldVal, int new Val)-replaces all occurrences of oldVal in the list with new Val. Note that you can still use the old nodes; just replace the values stored in those nodes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
