Strings are used for storing text.

String variable contains a collection of characters surrounded by double quotes:

Example

Create a variable of type String and assign it a value:

String greeting = "Hello";



Practice Excercise Practice now