# String Length

say it: **“string LENGKTH”** **/strɪŋ lɛŋkθ/**

The number of UTF-16 code units in a String.

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

**String Length** — The number of UTF-16 code units 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?category=java&level=2)

Updated: November 17, 2026

## In other subjects

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

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