This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 3255
    
    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!
 
 
subject: Number returned by indexOf used in combination with substring
 
Similar Threads
String to String array
substring??
doubt in indexOf()
Java Strings Getting a Substring
String Operations