9.2 The String Class - Tom Kleen

9.2 The String Class. A string is a sequence of characters. Strings are objects in Java. There are several ways to create a string. Assign a value. String message1 = "Hello"; Use the keyword new. String message = new String("Hello"); Create a new String using a . charArray. as the parameter to the constructor. char[] charArray = {'H', 'e', 'l ... ................
................