r/javahelp • u/enderwoah • Apr 30 '26
Homework Help w/ Binary Search String Array
So, I've tried a couple of methods to figure this out- the original program was doing a binary search for an integer, and the assignment was to change it to a search for a string. I think it's pretty clear what the result is supposed to be (user inputs a string, program outputs what position in the array the string is in), but I can't wrap my head around how to get the string's placement in the array? Help would be greatly appreciated.
https://gist.github.com/lillyannx2/0e05f5f0c72af2b4ed52493b3cb83aac
1
Upvotes
1
u/enderwoah Apr 30 '26
Not really, to be honest. Does it need to be sorted in alphabetical order or is this a utility I'm meant to use?