// Helene Martin, CSE 142 // Prints the minimum dating age based on a particular age. // goal: demonstrate variable declaration, usage and mutation public class Variables { public static void main(String[] args) { int age = 18; // declaration and initialization System.out.println("Minimum dating age: " + (age / 2.0 + 7)); age = 22; // mutation (changing a variable's value) System.out.println("Minimum dating age: " + (age / 2 + 7)); // note that the parentheses are important for making the calculation // happen before the concatenation } }