Java Strings
Strings are used for storing text.
A 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";
Strings are used for storing text.
A String
variable contains a collection of characters surrounded by double quotes:
Create a variable of type String
and assign it a value:
String greeting = "Hello";