loopzoop

1

votes
2

answer
46

views

Java: Finding the value in an array list that is closest to a particular negative number

My question is how I can write a method that takes an ArrayList of Doubles as a parameter and returning the Double in the array list that is closest to -3.75. I got the code down for the positive number 3.42, but I'm stuck as to modifying it to suit -3.75 public static double question3(ArrayList inp...
loopzoop