Let's try a slightly more complex program that will introduce variables. A variable is like a box that can hold something for you. In Java, you can put only one type of thing in a given box. Different types of variables can hold different things like: * `int` can hold an integer number (e.g. 42) * `double` can hold a real number (e.g. 3.141592) * `char` can hold a character (e.g. 'a' or '0' or '!') * `String` can hold a string of characters (e.g. "Howdy") * `boolean` can hold values with two states: true or false Variables are an important part of every program because they allow the program to do different things depending on what's in the box. 1. Close your current project if you have one open (File->Close Folder) 1. Make a new folder in your Java Projects folder named !VariablesExample 1. Open the folder (File->Open Folder) 1. Create a new file: (File->New File) 1. Cut and paste the program below into the editor window: {{{ public class VariablesExample { public static void main(String args[]) { int a; // create a variable that can hold an integer number int b; // create another integer variable named b int c; a = 3; b = 4; c = a * b; System.out.println(c); } } }}} 1. Save the file as !VariablesExample.java (File->Save) [[Image(JavaVariables.jpg,50%,margin=10,align=right)]] 1. Run the program 1. In the output terminal window, observe that the number 12 is output. === Understanding the program === Our example program: * Creates 3 variables (boxes) named a, b, c. They are all integer variables (they can only hold integer numbers). * The program then places the number 3 in variable a, the number 4 in variable b, and the product of whatever is in a and b into variable c. * Finally, the program prints whatever value is in variable c. === Extra Credit === 1. Change the program: adding more variables, change numbers and formulas and run it again. 1. Read more about Java variables [https://www.w3schools.com/java/java_variables.asp here]