【正文】
t method can’t C. Constructor can only be executed when creating a new object D. One class can only define one constructor 2. For JAVA language, which one Operator is VALID? A. amp。 B. C. D. := 3. Please chose the right statement about the following JAVA program class Cat { public void cry() { (miaow )。 Cat dummy = new DummyCat()。 ()。 ( Good+bye==Go+odbye )。 } A. falsefalse B. falsetrue C. truefalse D. truetrue 5. After executing the following code: a=0。 do{ c。 } while (a=0)。 } public static void main(String[] args) { String str=”1234”。 (str)。 return true。 for (foo(39。)。B39。amp。 foo(39。)) { i++。D39。 } } } A. ABDCBDCB B. ABCDABCD C. ABCDBDCB D. An exception is thrown at runtime. 10. Please write some code to implement binary search algorithm( 二分查找算法 ) in JAVA language. public static int binarySearch(int[] a, int value) // search “value” in sorted array “a” by binary search algorithm, and return the index of the first match. Please take the search failure case into account.