Net-informations.com
SiteMap  | About    

String indexOf() method

Java String indexOf() method returns the position of the specified string or char from the given string. If the target string or character does not exist, it will return -1. The String indexOf() method is case-sensitive , so uppercase and lowercase chars are treated to be different.

Syntax

Example

Output

Java String lastIndexOf()

The lastIndexOf() method searches right-to-left inside the given string for a target string and returns the index of the last occurrence of the character in the character sequence. If the target string is not found, it will return -1.

Syntax

Example

Output









net-informations.com (C) 2017    Founded by raps mk
All Rights Reserved. All other trademarks are property of their respective owners.