What does new do?
new invokes Java’s mechanism for creating new objects.
new does four things:
How the user the Scanner

instance variables
variables inside a class but outside a method
constructors

3 characterstics of a class
4 characterstics of an object
identify each element of the following code:
int argsNum =
encapsulation
The object maintains a boundary between its state and behaviour and the outside world.
Access modifiers enfore encapsulation:
difference between classes and objects and instances
A class is a blueprint which you use to create objects.
An object is an instance of a class - it’s a concrete ‘thing’ that you made using a specific class. So, ‘object’ and ‘instance’ are the same thing, but the word ‘instance’ indicates the relationship of an object to its class.
For example, suppose you have a class House. Your own house is an object and is an instance of class House. Your sister’s house is another object (another instance of class House).
how to create an object which is an instance of the class “House”
House myHouse = new House();
fields vs. attributes
An attribute is another term for a field. It’s typically a public constant or a public variable that can be accessed directly.
A class stores its state in fields.
A class aggregates attributes (fields) and methods (functions).
property
the getter and setter combination
fields vs. variables
Example of a inheritance use case
Suppose that you’re writing a human-resources application and want to use the Person class as the basis (also called the super class) for a new class called Employee. Being the child of Person, Employee would have all of the attributes of a Person class (Weight, Hair, Height), along with additional ones, such as:
import statements
An import statement tells the Java compiler where to find classes that you reference inside of your code.
import ClassNameToImport;
extra:
The class name should be fully qualified, meaning that it should include its package.
To import all classes within a package, you can put .* after the package name. For example, this statement imports every class in the com.makotojava package
import com.makotojava.*;
Importing an entire package can make your code less readable, however, so I recommend that you import only the classes that you need, using their fully qualified names.
How does a class declaration look like?
In general, class declarations can include these components, in order of when to write them:

Classes can have two types of members…
variables and methods.
The values of a class’s variables distinguish each instance of that class and define its state. These values are often referred to as instance variables.
components of variables
A variable has:
The possible accessSpecifier values for variables are…
No specifier (also called friendly or package private access): Only objects whose classes are defined in the same package can see the variable.
private: Only the class containing the variable can see it.
public: Any object in any package can see the variable. (don’t ever use this value; see the public variables sidebar.)
protected: Any object defined in the same package, or a subclass (defined in any package), can see the variable.

two main categories of methods
stack vs. heap
both reside on the memory
ADD MORE
nested if (else) statements

else if Statements

conditional operators
like using if else statments, but more compact:
