About 75,100 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 method to return the position of the last occurrence of specified character …

  2. java - Get string character by index - Stack Overflow

    Here is an example using three different techniques to iterate over the "characters" of a string (incl. using Java 8 stream API). Please notice this example includes characters of the Unicode …

  3. 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 a specified string. In this article, we will learn various ways to use …

  4. Searching And Indexing: indexOf (), lastIndexOf ()

    Java provides several methods for string searching and indexing that make this process easy. In this section, we’ll cover how to use methods like indexOf() and lastIndexOf(), how to search using regular …

  5. Mastering String Indexing in Java - javaspring.net

    Nov 12, 2025 · This blog post will delve into the fundamental concepts of string indexing in Java, explore usage methods, common practices, and best practices to help you gain an in-depth understanding …

  6. Java String indexOf () - Programiz

    The first occurrence of 'a' in the "Learn Java programming" string is at index 2. However, the index of second 'a' is returned when str1.indexOf('a', 4) is used.

  7. How to work with string indexing in Java - LabEx

    This comprehensive tutorial explores string indexing techniques in Java, providing developers with essential skills to navigate, manipulate, and extract information from strings efficiently.

  8. Introduction to String Indexing - Learn.java

    Learn how Strings are indexed and how to access individual characters of a String object

  9. Manipulating Characters in a String (The Java™ Tutorials - Oracle

    Here are some other String methods for finding characters or substrings within a string. The String class provides accessor methods that return the position within the string of a specific character or …

  10. Applications of String indexOf() Method in Java - GeeksforGeeks

    Jul 23, 2025 · There are four variants of indexOf () method. indexOf (): This method returns the index within this string of the first occurrence of the specified character or -1 if the character does not occur.