Lecture 7
15
static fields
•Syntax for accessing static field: ClassName.fieldName (e.g. System.out )    (no System constructor, no System object)
•Like global variables (in other languages)
•In Integer class (part of Java API)
–public static final int MAX_VALUE = 2147483647;
•final: Java keyword for “can’t be changed”
–int big = Integer.MAX_VALUE; // OK
–Integer.MAX_VALUE = 255; // error
•Naming convention for final fields: ALL_CAPS