Question: Write a method called firstLast that can accept either type of integer list as a parameter and that moves the first element of the list
Write a method called firstLast that can accept either type of integer list as a parameter and that moves the first element of the list to the end. For example, if a variable called list contains the values [12, 45, 78, 20, 36], the call of firstLast(list); will change the list to store [45, 78, 20, 36, 12].
Step by Step Solution
3.40 Rating (156 Votes )
There are 3 Steps involved in it
public void firstLast ... View full answer
Get step-by-step solutions from verified subject matter experts
