Edit on Github instead

A String is a piece of text in Java, and it gets its name from the way it "strings together" letters or numbers.

Strings are one of Java's main data types; unlike other data types, Strings are Objects, not primitives.

Strings are stored as sequences of characters. For example:

String name = "Hi!";

creates a new String called name made up of the characters "H", "i", and "!"

Suggest changes

Related links

URL Topic Source