String Literals
In order to write text in a program, you surround it with double quotes.
"Hello, World"
This is called a "string literal." It has the same relationship to String
that an integer literal like 123
has to int
.
void main() {
// Same as this "integer literal" is used to write a number
int abc = 123;
// A "string literal" is used to write text
String name = "penelope";
}