唯一的问题是,我必须使用这个常量,这是我大学作业的一部分。我的问题是Java不会考虑我的语句: System.out.println("Sorry you are out如果我让然后,它不会停止在10个猜测,它将继续猜测no -1,-2,-3...继续循环。 public class Assignment4 {
我的意思是-Please enter array sizePlease enter element 0Please enter element 1Sortedenter the element you want to find in the arrayMatch 3 found at index 0
但是,如果我查找数组中不存在的元素,程序就不会进入else循环我只需要帮助检查我的代码,而不是实现程序:)