Answer the index of the first occurrence of the given value in the list, or -1 if the value is not in the list.
-1
428429430431432433434435436437438
for (int i = 0; i < toGet.length; i++) { Assert.assertTrue("list should contain element " + i, l1.contains(toGet[i])); Assert.assertEquals("list element " + i + " is not correct", i, l1.indexOf(toGet[i])); } } public void testIndex2() {
450451452453454455456457458459460
// now index them back again for (int j = 0; j < 10; j++) { Assert.assertEquals("index of j'th item should be j", j, list.indexOf(r, j)); } } public void testListEquals()