Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

lastIndexOf() method doubt??  RSS feed

 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Guys,

Can anyone please explain me with an example the principle of lastIndexOf() method and how it works??

Thanks in advance.
 
Ignacio Cavero
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I suppose you are talking of the method of the List interface which returns the last index of the specified object (you can have the same object multiple times in a List, something that can't be done on a Set). I did a test code to show you, I was testing enums so I reused that code for this example, hope you are not using 1.4

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!