Can you post the output from the program. Have you read the API doc for the binareySearch method to see what values it returns? Why do you think -21 is wrong?
When does the array; result get any non empty values? Have you printed out the contents of result to see what it is loaded with? How many elements does it have? Change the number of elements and see if the value of index changes.
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...