The code compiles and runs (doing what it implied), but we have written code that doesn't do quite what we want to occur (such as dividing instead of multiplying, or not-quite-finding the maximum in an array)
Types created through a classdefinition or arraydefinition (whether we write the class or we get it from a library of code, such as java.util or java.lang)
When noinformation is lost, Java will convertbetweentypes for us. E.g., from int to double; from short to int; from anything to String (for printing purposes, usually; uses the toString() method for objects)
Programmer-specified conversions. Usually required when the conversion loses precision or other information; tells Java that it is 'okay' to perform the lossy action. E.g.: from double to int; from long to short
A type and an identifier. Tells Java that there should be a namedstoragelocation that can containonevalueofthegiventype, and will be accessed using the given identifier
Requires an 'Iterator' (arrays are Iterators). Looks like value-based for loop from Python; avoids index usage but still lets us access/modify each element in the Iterator (array, for us for now)
A class is a type. It is like a blueprint for makingobjects. It defines the state that each object will have, and what behaviors (methods) are available for those objects
An object is a value. (A value of a particular class type). It is an instance of its class (one distinct value of that type). It has its own copy of each instancevariable and method
A variable is a namedcontainer (on the stack). A reference is just a (type,address) pair of an address of an object in memory that also knows what type it points to. Some variables only contain primitive values (no reference), while other variables only contain references (the value is elsewhere). An object is an instance of a class (it's a value), and it resides in the heap memory. The object contains its own copy of each instance variable and method
Many references can have the address of the sameobject; they are called aliases. Since there's only one object involved, updates via one reference are visible through the otherreferences
Special method that is used when creating a new object
No returntype listed (returns reference to object of the class's type)
Method name must be the class name exactly
Parameters: entirely at programmer's discretion. (Often one per instancevariable)
Default constructor: If a class definition doesnot explicitly list a constructor definition, then a default implementation is available: no parameters, and all instance variables receive default values: 0, false, and null (for reference types)
Formal parameters defined in parameter list (declares them); when a method is called, the actual parameters (arguments) are supplied to instantiate the formal parameters for this particular invocation of the method. Parameters are local variables