/** Moo */
 @Test
 public void testIsEmpty() {
   assertTrue(words.isEmpty());
   words.add("hello");
   assertFalse(words.isEmpty());
   words.remove(0);
   assertTrue(words.isEmpty());
 }
Beispiel #2
0
 public static int binarySearch(MyArrayList list, Object key) {
   if (list.isEmpty()) return -1;
   return binarySearch(list, 0, list.size() - 1, key);
 }