This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Associate Certification (OCAJP 7/8) and the fly likes Number returned by indexOf used in combination with substring Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Certification » Associate Certification (OCAJP 7/8)
Bookmark "Number returned by indexOf used in combination with substring" Watch "Number returned by indexOf used in combination with substring" New topic
Author

Number returned by indexOf used in combination with substring

Glenn Gould
Greenhorn

Joined: Jul 09, 2013
Posts: 5

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

Joined: Sep 23, 2000
Posts: 3381
    
    8
This is as per the JavaDoc API description. Take a look at the second parameter to indexOf.


Enthuware - Best Mock Exams and Questions for Oracle/Sun Java Certifications
Quality Guaranteed - Pass or Full Refund!
 
I agree. Here's the link: http://kickstarter.com/rocket-mass-heater
 
subject: Number returned by indexOf used in combination with substring