I tried using a binary search with an Arraylist and it gave me this message:
The method binarySearch(List>, T) in the type Collections is not applicable for the arguments (ArrayList, String)
Here's the code:
ArrayList <Object> a = new ArrayList <Object> ();
String date = JOptionPane.showInputDialog(null, "Please enter the date.")
int index = Collections.binarySearch(a, date);
The binary search should return the position of a specific date from an array (a) of several dates. What am I doing wrong?