KnowledgeBoat Logo
|
LoginJOIN NOW

Computer Applications

The index of a string …………… .

  1. ranges from 0 to the length -1 of the string
  2. ranges from 0 to the length of the string
  3. ranges from 1 to the length of the string
  4. ranges from 1 to the length -1 of the string

Java String Handling

2 Likes

Answer

ranges from 0 to the length -1 of the string

Reason — The index of a string ranges from 0 to the length -1 of the string as a string is similar to a character array whose index starts from 0 to size - 1.

Answered By

1 Like


Related Questions