Simple string search in Java

1
2
public class StringSearch {
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Java offers a Library method called indexOf().

This method is used with String Object and it returns the position of index of desired string. If the string is not found then -1 is returned.

#java #string #search

#cesarnog

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.