is startsWith faster than indexOf
<p>I am writing some java code where I branch off based on whether a string starts with certain characters while looping through a dataset and my dataset is expected to be large. </p>

<p>I was wondering whether startsWith is faster than indexOf. I did experiment with 2000 records and did find any difference.</p>
