Menu

Use Java Code Think Recursion Lists Given List Integers Write Method Returns New List Elem Q43889770

static List<Integer> negateAll(List<Integer> a) Given a list of integers a, write a method that returns a new list with all t

Use JAVA code and think about the recursion andlists!!!
Given a list of integers a, write a method that returns a new listwith all the elements of a with sign negated, i.e., positiveintegers become negatives and negative integers become positives.Example:
[2, -5, 8, 0] ==> [-2, 5, -8, 0]

static List<Integer> negateAll(List<Integer> a) Given a list of integers a, write a method that returns a new list with all the elements of a with sign negated, i.e., positive integers become negatives and negative integers become positives. Example: Show transcribed image text static List negateAll(List a) Given a list of integers a, write a method that returns a new list with all the elements of a with sign negated, i.e., positive integers become negatives and negative integers become positives. Example:

Expert Answer


Answer to Use JAVA code and think about the recursion and lists!!! Given a list of integers a, write a method that returns a new …

OR