# String Index

A zero-based position used to locate a character in a String.

## What is **String Index** in Java?

**String Index** — A zero-based position used to locate a character in a String.

```java
class Location {
    String city = "Denver";
    int characterCount = city.length();
    char firstCharacter = city.charAt(0);
}
```

Level: Apprentice · [More Java terms at this level](https://www.ask-codey.com/glossary/subjects/java/apprentice)

Updated: September 27, 2026

## In other subjects

- [String Index in C#](https://www.ask-codey.com/glossary/string-index-c-sharp)
- [String Index in JavaScript](https://www.ask-codey.com/glossary/string-index-javascript)

Source: https://www.ask-codey.com/glossary/string-index
