How i get the index of if there are duplicate values in list, lest say there is banana on index 3 and index5. it give only 3, but it is present on 5 as well. please assist.
@@naitikpatle6180 in that case you need to iterate and use another function to check whether list contains that element at multiple indexes and store it in another collection variable.
Yes ordered collection is always useful when you want to work on a kind of a sorted list or there are records where they are dependent on the order they are processed. In such cases you would always want to have control on the order of how records are added in a collection and this is where it would come in handy!
such a good explanation.... thanks :)
@@AnusaiYellapu thank you 😇
very informative. I am new to coding. I can understand very well what you are explaining
@@abishekkrishnan8447 thats really good to hear 😇
Thanks bhai for sharing your expertise in Apex
😇
How i get the index of if there are duplicate values in list, lest say there is banana on index 3 and index5.
it give only 3, but it is present on 5 as well.
please assist.
@@naitikpatle6180 in that case you need to iterate and use another function to check whether list contains that element at multiple indexes and store it in another collection variable.
@@salesforcemakessense Thanks, will try with you tutorial.
What is benefits of ordered collections.... This the question i have encountered in an interview.....
Yes ordered collection is always useful when you want to work on a kind of a sorted list or there are records where they are dependent on the order they are processed.
In such cases you would always want to have control on the order of how records are added in a collection and this is where it would come in handy!
@@salesforcemakessense thanks