Java String lastIndexOf () method

Source: Internet
Author: User
Java String lastIndexOf ()

Java String lastIndexOf () Method Example

Returns the index of the last occurrence of the specified character in this string, or 1 if no such character is present in the string.

Java String lastIndexOf (int ch, int fromIndex) Method Example

Returns the index of the last occurrence of the specified character in this string from the Fromindex position, or 1 if there is no such character in the string.

Java string lastIndexOf (string substring) Method Example

Returns the index of the last occurrence of the given substring, or 1 if there are no such substrings in this string.

Java string lastIndexOf (string substring, int fromIndex) Method Example

Returns the index of the last occurrence of the given substring from the Fromindex location and returns 1 if there is no such substring in the string.

Java String lastIndexOf () method

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.