This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Associate Certification (OCAJP 7) 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Associate Certification (OCAJP 7)
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: 3253
    
    2
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://aspose.com/file-tools
 
subject: Number returned by indexOf used in combination with substring
 
Similar Threads
substring??
doubt in indexOf()
Java Strings Getting a Substring
String Operations
String to String array