Chapter 13. Strings

DO OR DIE

  • Don't tell me what to do

A String is a set of zero or more characters. A String can be empty, or its reference can be null, or it can contain the entire text of King Lear. Strings are objects in the java.lang package, and are used so frequently that they are the only class in Java with their own special constructor syntax. In this topic, we put the moves on a few String objects and see how they like it.

Get Java Garage now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.