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