• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Number returned by indexOf used in combination with substring

 
Glenn Gould
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Question: Why does the indexOf method start with the second 'I' in String "MINIMUM" instead of the first?


 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3817
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is as per the JavaDoc API description. Take a look at the second parameter to indexOf.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic