filmov
tv
Java Tutorial 10 - String Data Type

Показать описание
The String data type stores a string of characters.
// String Concatenation
String message = "Welcome" + " to " + "Java"; // reference type
// String Chapter is concatenated with number 10
String chapter10 = "Chapter " + 10; // chapter10 becomes Chapter 10
// String supplement is concatenated with character C
String supplementC = "Supplement " + 'C'; // supplementC becomes Supplement C
// String Concatenation
String message = "Welcome" + " to " + "Java"; // reference type
// String Chapter is concatenated with number 10
String chapter10 = "Chapter " + 10; // chapter10 becomes Chapter 10
// String supplement is concatenated with character C
String supplementC = "Supplement " + 'C'; // supplementC becomes Supplement C