We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5837e94 commit 7d76cedCopy full SHA for 7d76ced
collections/linkedlist/get-an-index-of-element-of-linkedlist/LinkedListLastIndexOf.java
@@ -25,12 +25,12 @@ public static void main(String[] args) {
25
System.out.println("LinkedList: ");
26
System.out.println(linkedList);
27
28
- // get first index of GoldSpot
+ // get last index of GoldSpot
29
int index = linkedList.lastIndexOf("GoldSpot"); // 6
30
31
System.out.println("\nIndex of the GoldSpot in linkedList is: "+ index);
32
33
- // get first index of Moxie
+ // get last index of Moxie
34
int indexMoxie = linkedList.lastIndexOf("Moxie"); // 7
35
36
System.out.println("\nIndex of the Moxie in linkedList is: "+ indexMoxie);
0 commit comments