String type
The String type represents an UTF-8 encoded character sequence.
Note: the
.lengthproperty of a String equals the byte total, and the.chars().length()method of a String equals the Code Point total.
Nullability
Even though it is a primitive type, the String type may be assigned null to indicate absence of value, as it is a reference type.
Note:
nulland""are two different values. You may test for both through usingStringas a falsy condition.