In This Chapter
• Use strings to store text
• Display strings in a program
• Include special characters in a string
• Paste two strings together
• Include variables in a string
• Compare two strings
• Determine the length of a string
In Minecraft, information often is presented to players as a line of text on the screen. A line of text in a Java program is called a string.
Strings are the simplest and most common means to communicate with users in any program. They are collections of text—letters, numbers, punctuation, and other characters. During this chapter, you learn all about working with strings.
Strings store text and present it to users. The most basic element of a string is a character. ...