CMSC 131 Lecture Notes - Lecture 3: Access Modifiers
Document Summary
Cmsc131 lecture 3: java modifiers, variables, arrays, enums. Like in many other programming languages, we can modify the status of classes, methods, etc, by adding a modifier in front of it. Access modifiers set the accessibility of methods and classes or objects. Non access modifiers are not concerned with access as the name implies. We will go into more detail with modifiers later on. There are three types of variables in java. Like with modifiers, we will go into more detail later. For now, it will just suffice to know the types of variables. Arrays are objects that store multiple variables of the same type. For example, we can have an array of shoe sizes. An array itself is an object on the heap. We will look at how to declare , construct, and initialize an array later. Enumerations restrict a variable to only a few predefined values.