7. Use Strings to Communicate

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.

Storing Text in Strings

Strings store text and present it to users. The most basic element of a string is a character. ...

Get Absolute Beginner’s Guide to Minecraft® Mods Programming, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.