notes


initialization vs assignment vs declaration Declaration means telling the compiler/interpreter that a variable (or function) exists and what type it is (if applicable). int x; // declaration Initialization means giving a variable its first value (often at the time of declaration). int x = 10; // declaration + initialization Assignment means giving or updating the value of a variable after it has already been declared (and possibly initialized). int x; // declaration x = 10; // initialization (first assignment) x = 20; // reassignment (new value)