Question: Problem: Write a method that will return a list with all numbers from a given list that are greater than the last value in the
Problem: Write a method that will return a list with all numbers from a given list that are greater than the last value in the given list. If the given list is empty, return an empty list []. If there are not values in the given list greater than the last value, return an empty list []. The code should work regardless of the parameter passed in.
Data: A list containing 0 or more values. The list will not point at null.
Output: Return a new list.
Sample Data 1, 2, 3, 1, 1 4, 15, 7, 73, 7 2, 2, 2 -11, -12, -3, 7, -134 Sample Output [2, 3] [15, 73] [] [-11, -12, -3, -7]
Starter code: JAVA ONLY List
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
