O'Reilly logo

Minecraft Mods Programming Absolute Beginner’s Guide by Rogers Cadenhead

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6. Store and Change Information in a Mod

In This Chapter

Create a variable

Use different types of variables

Store values in variables

Use variables in mathematical expressions

Store one variable’s value in another variable

Increase and decrease a variable’s value

In Chapter 4, “Start Writing Java Programs,” you used a variable, a special storage place designed to hold information. The information stored in variables can be changed as a program runs. Your first program stored a string of text in a variable. Strings are only one type of information that can be stored in variables. They also can hold characters, integers, floating-point numbers, and objects.

During this chapter, you learn more about using variables in your Java programs. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required