Today in class, we started off by talking about the difference between strings and characters. Characters just store one character at a time but strings are made up of multiple characters. Each character has an integer it corresponds to. You can see which character corresponds to what integer here: https://www.asciitable.com/
Concatenation means combining different things into one string. The operation we use for this is a plus sign (+).
String a = "Hello";
char b = 'a';
int c = 1;
System.out.println(a + b + c);
would print out "Helloa1".
We also learned about other string operations.
String length and index: length()
A character of a string: charAt():
Search for a substring: indexOf(), lastIndexOf(), contains()
Comparing strings: compareTo()
String a = "Hello World";
System.out.println(a.length()); //This will print out "11"
System.out.println(a.charAt(2)); //This will print out "l"
System.out.println(a.substring(1, 4); //This will print out "ell"
System.out.println(a.indexOf("Hello")); //This will print out "0"
System.out.println(a.lastIndexOf("l")); //This will print out "9"
System.out.println(a.contains("World")): //This will print out "true"