About 44,300 results
Open links in new tab
  1. Java String indexOf () Method - W3Schools

    The indexOf () method returns the position of the first occurrence of specified character (s) in a string. Tip: Use the lastIndexOf …

  2. Java String indexOf () Method - GeeksforGeeks

    Nov 19, 2024 · In Java, the String indexOf () method returns the position of the first occurrence of the specified character or string in …

  3. String (Java Platform SE 8 ) - Oracle Help Center

    The offset argument is the index of the first character of the subarray and the count argument specifies the length of the subarray. …

  4. Java String indexOf () - Programiz

    To find the index of the specified substring within the string, indexOf () takes these two parameters: str - the string whose starting …

  5. Java String indexOf () 方法 - 菜鸟教程

    Java String indexOf () 方法 Java String类 indexOf () 方法有以下四种形式: public int indexOf (int ch): 返回指定字符在字符串中第一 …

  6. List indexOf() Method in Java with Examples - GeeksforGeeks

    Nov 29, 2024 · This method returns the index of the first occurrence of the specified element in this list, or -1 if this list does not …

  7. Java String.indexOf () - Baeldung

    Apr 11, 2025 · The method indexOf () returns the first occurrence index of a character or a String in another String. We can pass the …

  8. Java String indexOf () Method - Online Tutorials Library

    Here is the syntax of this method − Here is the detail of parameters − This will produce the following result.

  9. indexOf in Java – How to Find the Index of a String in Java

    Mar 24, 2022 · A string is a collection of characters nested in double quotes. The indexOf method returns the index position of a …

  10. Using indexOf to Find All Occurrences of a Word in a String

    Jan 8, 2024 · In this tutorial, we’ll demonstrate a simple algorithm that uses the indexOf (String str, int fromIndex) method of the Java …