A. abstract class: a class that cannot instantiate (create objects from class)
Needed bc it provides a base class with shared attributes and methods
However, you can make instantiable subclasses.
You can have real methods
Intended to enforce and organize the requirements of every subclass
B. abstraction: separating implementation from use
The benefit of abstraction is the reduction of complexity by hiding the implementation details
C. abstract method: a method without a body
D. accessor/getter: a method that accesses fields to get value but does not modify a class field.
E. actual parameter: value is passed through the parameter when it is called
F. aggregation: “has-a” relationship between two classes where a class contains a reference to a class
I. ArrayList: resizable array allowing storage and manipulation of a list of objects.
J. array: an ordered list of items of the same data type
K. binary: 0’s and 1’s algorithm begins at midpoint of range and halve the rage after each other guess
L. block: section of code enclosed in curly braces
O. Byte code: output of the java compiler javac (.class)
P. catch block: handles/catches exceptions
Q. checked exception: exceptions that are checked at the compile time
R. class: blueprint for building methods
S. class contract: public methods and constants of that class
X. concrete class class that can be instantiated directly
Y. constructor: involved to create an object using the new keyword
Z. constructor chaining calling one constructor from another constructor
AA. deep Copy stores copies of objects value
EE. equals: compares strings and returns true if they are equal
FF. encapsulation: information hiding & making properties private (defining getters and settlers)
GG. event-driven programming flow of the program determined by events
II. explicit casting manual type casting occurs when you force the conversion of a larger data type to a smaller data type
JJ. finally clause block of code used with try-catch to make sure code is executed regardless of exceptions
HH. Exception: an event that interrupts the normal flow of the program instructions
LL. for loop loop with predetermined beginning end and increment
MM. garbage collection JVM reclaims memory and no longer is used
Helps prevent memory leaks as objects no longer referenced or needed are removed from memory
Focused on the heap where reference type variables, static variables, objects, instance variables, and arrays
PP. immutable object whose state cannot be changed after it is created (ex String and Int)
QQ. implicit casting occurs when smaller data type automatically converted to a larger data typewithout need of explicit casting (assigning a smaller data type to a larger data type)
RR. inheritance allows a class to inherit properties and behaviors from another class
SS. Insertion sort comparison-based sorting algorithm building the sorted array(or list) one element at a time
TT. instance object created from a class
UU. interface declares methods that a class must implement but does not provide method bodies
VV. interning storing only one copy of each distinct string value, shared by all references of that string (for memory optimization)
WW. JavaFX java library used to build rich desktop applications and gui’s
XX. JVM allows bytecode to run without having to be recompiled
AAA. linear linear search scans one item at a time
EEE. mutator/setter : Method used to modify encapsulated data field
FFF. no-arg - no arguments
GGG. No Answer void return type
HHH. null default value assigned to reference type propeties
III. Object grouping of data(variables) and operations that can be performed on data(methods).
JJJ. overloading: multiple methods with the same name but different signatures
KKK. overriding grouping data and operations that can be preformed on the data
LLL. package used to group related classes
MMM. pass-by-reference where formal parameter acts as an alias for actual parameter
NNN. pass-by-value invokes a method with a parameters, value of argument is passed to the parameter
OOO. polymorphism - ability of an object to take on many forms.
It allows objects of different classes to be treated as objects of a common type, such as their superclass or an interface. This feature enables writing more flexible and reusable code.
Polymorphism is achieved through method overriding and method overloading.
PPP. primitive: build in immutable data types 8 including byte short int long float double char and boolean
QQQ. procedural programming: programming style using a series of steps to define how a computer program behaves
RRR. private variables that member methods can access but class users cannot
SSS. properties fields + getters/setters
TTT. protected access modifier meaning can be accessed in the same package and in subclasses but not non-subclass classes outside the package
UUU. public: access modifier used to declare class members have the widest possible visibility (can access from outside the package.
VVV. reference variable type that refers to object
WWW. runtime heap: memory area where objects created with new are stored and managed by garbage collector
Focused on the heap where reference type variables, objects, instance variables, and arrays
XXX. runtime stack: stores activation record at runtime last-in first out fashion
memory area storing method calls, local variables, and control flow (last in first out)
References to objects
Local variables
Method calls
YYY. Scene refers to a part of gui for visual elements that make up user interface of an application
ZZZ. scope declared name is only valid in a region of code, aka scope
AAAA. Selection sort repeatedly selecting the smallest or largest element from the unsorted portion of the list swapping it with the first unsorted elements
BBBB. Shallow copy stores the references of the object to the original memory addresses
FFFF. static modifier used to describe variable shared by all instances of a class
can be used without instantiation of its class
GGGG. StringBuffer java class represents a string that is mutable had its own methods for string modification (syncronized)
HHHH. StringBuilder allows dynamic modification of a string w/ its own methods (unsyncronized)
LLLL. this() reference to an object whose method or constructor is being called
MMMM. throws clause used in method declaration to indicate that the method can throw one or more exceptions during its execution
NNNN. try block surrounds normal code and exits it a statement within ta ry block throws exception
OOOO. UML Unified Modeling Language illustration of class templates and objects
PPPP. VBox layout container arranging it children in a vertical column
QQQQ. Wrapper: Built-in classes there to augment (enhance) primitive type wrapper class
wrapper objects and Strings are immutable
RRRR. == equality operator
.java (source file) - contains human readable code defining java structure then integrated into ide
Abstract Datatype data structure defined by its behaviors rather than its implementation
access modifiers - determines the visibility and accessibility of classes, methods, and variables
activation record (stack frame) stores parameters and variables for method in the runtime stack
Assert Operator assert keyword used to test assumptions made by the programmer during program development
Autoboxing: primitive type to wrapper class
Unboxing: wrapper class to primitive
behaviors actions or operations that an object can perform
class members class fields and methods
compiler (javac) translates Java source code written in .java files into bytecode that can be executed by the Java Virtual Machine
compareTo() compare two objects to determine their order
default constructor: constructor called without any arguments
Doc Comments /**comments ignored by jvm */
equals() vs. ===
Equality operator references memory addresses or object
equals() campares values or contents of objects(usually strings)
formal parameter: is a variable that is defined in the method declaration and is used to receive a value when the method is called
gps / driver /car : classes
hardware physical components of a computer system
implicit parameter refers to an object on which a method is called (this) example this.model - model
incremental development process where programmer write,compiles, and tests a small amount of code, and then repeats
instance method method belonging to class instance example MyClass obj = new MyClass(); obj.instanceMethod);
Javadoc tool for generating API documentation in HTML format from Java source code
JDK Java Develoment Kit used for developing java application
method abstraction hiding implementation details of a method only showing functionality
method body block of code defining what the method does
method header specifies the modifies, return value type, method name and parameters of the method
method signature name and parameter list
new: a keyword that creates a new object
no-arg constructor constructor (method that creates objects using new key word) with no arguments aka default constructor
non-static variable/field (instance variable)
Variable declared in the class but outside any method constructor or block
Exists as long as the object exists and accessible in all methods of the class
Example - instance variable
operating system (e.g. windows, linux, macOS) system software that provides the environment and resources required to run java applications.
oversize array number of elements used is less than or equal to memory allocatted
package namespace used to organize classes, interfaces, and other types
perfect size array where the number of elements is exactly equal to the memory allocated
primitive type (e.g. int, float, char, boolean,...)
private helper methods private methods to help public methods carry out tasks
property/state/fields
Field- variable declared inside the class but outside methods used to store object attributes
Example: instance variables
Property - field and getters + setters
State- objects collective set of all its fields current values example person.name = “Alice”
reference type: all objects are reference types; reference types store memory address
return statement used to exit a method and optionally return a value to the caller
scope of class properties vs. scope of local variables
Scope of class properties(instance variables) - declates outside methods but in class scope addessible throughout the class as long as the object exists
Example String color;
Scope of local variables- olny declared inside methods, constructors, or block only accessible within the block or method where they are defined
SDK software development kit (tools and libraries that are needed for developing applications in java)
side effects method updates a field variable and it has effects going beyond parameters and return value
static field/variable (class variable) declared with static keyword shares across all instances of the class, belongs to the class itself not any objects of the class
static member method (or just static method) method belonging to the class not an instance of the class, can be called without creating an object
testbench separate program whos sole purpose is to check that a method returns correct output values for a variety of input values
test vector unique set of input values
Local variable: variable defined within a block or method constructor
Unit Testing individually testing small parts of a program
user / application / computer (hw)
void return type that indicates the method does not return any value
Why use methods?
Methods allow code reusability, modular implementation,
Class implementation details of each member method
Element item in an array
Index element location in array
Ragged array array with same numbers of rows varying columns