1/36
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
arguments
values that take the place of its corresponding parameter
parameters
the placeholders for values that will be fulfilled by the arguments
constructors
purpose is to initialize the fields
shadowing
when two variables of different scopes have the same name and are in memory at the same time, can be fixed with this. or different field names (like my)
overloading
2 or more methods with the same class and same name but different parameters
toString
purpose is to report the state of the object, is automatically invoked when you try to print the object reference and will print the memory location if not overridden
this () vs. this.
this. is used to access an instance field or method (but not the constructors; normally used to avoid shadowing; this() is used to access a different constructor, it must be the first line of the constructor
concatenation
the joining of two or more strings, can also join numbers to strings in a commutative manner
black box theory
private values that can only be accessed through methods that can access and retrieve the information from inside the class
method
series of instructions that implement a behavior of an object (what the object does)
class
blueprint of an object
object
the instance of a class
mutator
used to change the values that an object contains
accessor
allows the client of teh class to extract data from an objecte
errors
mistakes made in coding that prevent the code from running or returning values that are logically incorrect
questions about the scope of variables
1) where is it declared
2) who has access
3) when does it leave memory
instance fields
where the object stores it values
instatiation
the process of creating an object
variable
location in memory where value is stored
assignment operator
stores the value of the right to the left, generally using the “=” symbol
object attribute
what an object has; stored in the fields
object method
what an object does
object state
determined by the values of the fields
abstraction
understanding what something does, not how it does it
encapsulation
data and methods belong to an individual object-each object has their own methods and attribute (the grouping together of methods into one class)
parameter
the data the method needs to do its job
“new” keyword
1) creates the object
2) calls upon the constructor
default constructor
no parameters assigns default values to instance fields
parameterized constructor
has parameters that assigns values to instance fields
“camel” notation
is the practice of writing compound words or phrases such that each word or abbreviation begind to a capital letter
“humpback” notation
the first letter starts with a lowercase letter when naming
object reference
object variable, whats used to store an object
“null” keyword
releases the reference from the object
this. vs this()
this. is used to access an instance field or method in order to generally resolve errors due to shadowing
this() is used to access a different constructor; it must be the first line of the constructor
local scope characteristics
1) declared within method
2) can be in method signature (as a parameter) or the body
3) can only be accessed within the method
4) is out of scope when the method ends
class scope characteristics
1) declared in the class (not in a method)
2) variables are called instance fields
3) is out of scope when the object leaves memory/object reference goes to 0
block scope characteristics
1) declared in a block statement
2) variables are known as block variables
3) only the block has access to it
4) is out of scope when the block statement ends