Strings
Here are the notes.
The notes covered Strings and concatenation
(using the plus operator to join Strings together).
Note
- Strings are a sequence of characters surrounded by double quotes.
- When you print a String, the value is printed exactly; when you print
a variable, the contents of the variable are printed:
String name = "Harry";
System.out.println("name"); // prints name
System.out.println(name); // prints Harry
- The String class has a number of useful methods,
two of the most useful are length() and substring().
Any questions?