I wrote the following code. It's a program which uses Binary Search to locate an element. I try to utilize exception handling to mitigate against the usage of decimal numbers. My intention is for the program to act as follows:
If decimal Number is entered, tell the user that decimals are not allowed and re-run the main method.
What is happening is strange. The main method appears to be running multiple times. Why is this?
My other question is in regards to a bug in my code... If I search for "6000" (the last value in my array) my program tells me that it can't find it. I'm not sure why...