Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8326500

Mistake in String.indexOf function documentation (int to char)

XMLWordPrintable

    • generic
    • generic

      A DESCRIPTION OF THE PROBLEM :
      Hello,

      Sorry for my bad english.

      I think there is a mistake in the documentation of String class here : https://docs.oracle.com/javase/7/docs/api/java/lang/String.html#indexOf(int)

      If you go to the indexOf function definition, it is written that it takes in parameter an "int ch"... but I think this is a character.

      Original : "public int indexOf(int ch)"
      New : "public int indexOf(char ch)"

      Furthermore, you wrote it is a character in the subsection "Parameters".

      Hope it helps.

      Greetings,
      Maxime SENDEN


            rkale Raghu Kale
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: