Java Flashcards

(201 cards)

1
Q

What is an identifier?

A

A letter followed by any number of letters and numbers, case sensitive, that are used to identify classes, variables, methods, etc.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a name?

A

A series of identifiers separated by a dot (.) such as, “System.out”.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Java bytecode

A

A Java compiler translates Java source code into Java bytecode to be used by the Java interpreter to execute it on a specific machine. (Unlike machine code, Java bytecode is not tied to a particular processor.)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Problem Solving Steps

A
  1. Understand the problem.
  2. Design a solution.
  3. Consider alternatives to the solution and refine the solution.
  4. Implement the solution.
  5. Test the solution and fix any problems that exist.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Software Development Activities

A
  1. Establish the requirements.
  2. Creating a design.
  3. Implementing the design.
  4. Testing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

object

A

A fundmental element in a program. Every object has:

  1. A state or state of being - as in the fundamental characteristics that currently define the object.
  2. A set of behaviors - The activities associated with the object.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

attributes

A

The values the object stores internally, which may represent primitive data or other objects. Collectively, the values of an object’s attributes define its current state.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

method

A

A group of programing statements that have been given a name.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

class

A

An object is defined by a class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

encapsulation

A

An object that protects and manages its own information. An object that is self-governing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

inheritance

A

The definition of one class that is based on another class that already exists.

Common characteristics are defined in high-level classes, and specific differences are defined in derived classes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Polymorphism

A

We can refer to multiple types of related objects over time in consistent ways

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

System.out.print(“ “);

A

Prints the information between the parentheses to the screen and does not advance to the next line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

System.out.println(“ “);

A

Prints the information between the parentheses to the screen and advance to the next line.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

string concatenation

A

The use of an operator to append one string to the end of another, such as:

“The only stupid question is “ + “the one that’s not asked.”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Escape Sequences

\b

A

backspace

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Escape Sequences

\t

A

tab

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Escape Sequences

\n

A

newline

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Escape Sequences

\r

A

carriage return

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

Escape Sequences

"

A

double quote

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Escape Sequences

'

A

single quote

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Escape Sequences

\

A

backslash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

variable

A

A name for a location in memory used to hold a data value.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Local Variable Declaration

A

Consists of a Type followed by a list of variable names.

If the final modifier preceeds the declaration, the identifiers are declared as named constants whose values cannot be changed once they are set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
assignment statement
Identifier = Expression; total = 57;
26
Primitive Data Types
1. four subsets of integers 1. byte 2. short 3. int 4. long 2. two floating point data types 1. float 2. double 3. character 4. boolean
27
byte
Storage: 8 bits Min value: -128 Max value: 127
28
short
Storage: 16 bits Min value: -32,768 Max value: 32,767
29
int
Storage: 32 bits Min value: -2,147,483,648 Max value: 2,147,483,647
30
long
Storage: 64 bits Min value: -9,223,372,036,854,775,808 Max value: 9,223,372,036,854,775,807
31
float
Storage: 32 bits Min value: Approximately -3.4E+38 with 7 significant digits Max value: Approximately -3.4E+38 with 7 significant digits
32
constants
Identifiers similar to variables except that they hold a particular value for the duration of their existence. They should be in the form of: **final** int **MAX\_OCCUPANCY** = 427;
33
characters
A **character literal** is expressed in Java with single quotation characters, as in **'b'** or **'J'** Each character in a character set, such as ASCII has a number value that can be used in **if statements.**
34
control characters
Nonprinting or invisible characters. Examples: carriage return, null, and end-of-text marks
35
boolean
Only has two values: **true** and **false**
36
expression
A combination of one or more opperators and operands that usually perform a calculation. The value calculated does not have to be a number but often is.
37
Arithmetic operations
**addition** (+) **subtraction** (-) **multiplication** (\*) **division** (/) **remainder**(%) - The result is the remainder of n/m in the form of n % m and has the sign of the numerator.
38
Operator Precedence
**multiplication**, **division**, and **remainder** have **equal** **precidence** and are performed **before** addition and subtraction. **Addition** and **subtraction** have **equal** **precidence**.
39
Increment Operator
++ Adds 1 to any integer or floating point value count++;
40
Decrement Operator
-- Subtracts 1 from any integer or floating point value count--;
41
Assignment Operators
Examples: total += 5; is the same as total = total + 5; total -= 5; is the same as total = total - 5; total \*= 5; is the same as total = total \* 5; total /= 5; is the same as total = total / 5; total %= 5; is the same as total = total % 5;
42
Data Conversion
Converting a data value from one type to another type. However, the safest way is to go from a smaller data type to a larger one. If not, some bits are lost in the conversion.
43
Casting
A Java operator that is specified by a type name in parentheses: dollars = **(int)** money;
44
Scanner class
Part of the standard Java class library, provides convenient methods for reading input values of various types. _You must first create a *Scanner** ***object in order to invoke its methods._ _Example:_ Scanner scan = new Scanner (System.in);
45
Instantiation | (Objects)
Using the ***new*** opperator which returns the address of the new object.
46
aliases
Two object designators that point to the same object. String name1 = "Ada"; String name2 = "Grace"; name2 = name1; Now name2 points to the same object as name1, which is "Ada".
47
immutable
In reference to String object - Once created, the value cannot be lengthened or shortened, nor can any of its chararcters change. When change, that object is no longer references and a new object is created. If not referenece by another designator, the object is no longer useable and is eventually elliminated by the automatic Java garbage collector.
48
String (String str)
Constructor: creates a new string object with the same characteristics as str.
49
char charAt (int index)
Returns the character at the specified index.
50
int compareTo (String str)
Returns an integer indicating if this string is lexically before (a negative return value) equal to (a zero return value), or lexically after (a positive return value), the string str.
51
String concat (String str)
Returns a new string consisting of this string concatenated with str.
52
boolean equals (String str)
Returns true if the string contains the same characters as str.
53
int lenght ()
Returns the # of characters in this string.
54
String replace (char oldChar, char newChar)
Returns a new string that is identical with the string except that every occurance of oldChar is replaced by newChar.
55
String substring (int offset, int endIndex)
Returns a new string that is a subset of this string starting at index offset and extending through endIndex-1.
56
String toLowerCase ()
Returns a new string identical to this string except all uppercase letters are converted to their lowercase equivalent.
57
String toUpperCase ()
Returns a new string identical to this string except all lowercase letters are converted to their uppcase equivalent.
58
import
Java keyword used to allow the program to use another class from within a particular class. This can be done by package (import java.util.\*;) or by a particular class within the package (import java.util.Random;).
59
static method
Also called class methods - They can be invoked through the name of the class in which they are defined, without having to instantiate an object of the class first.
60
NumberFormat Class ***(ordinal value)***
The first value in an enumerated type has an ordinal value of 0, the second has a vaule of 1, and so on. The **ordinal** method returns the numeric value associated with a particular enumerated type value.
61
enumerated type
Establishes all possible values or a variable of that type by listing, ore enumerating, them. Example: enum Season {winter, spring, summer, fall}; Season time; time = winter; **(correct)** time = 10; **(incorrect)**
62
enumerated type **(ordinal value)**
The **first value** in an enumerated type has an ordinal value of **0**, the **second value** has an ordinal value of **1**, and so on. To get the ordinal value of an enumerated type, you can use the **ordinal()** method.
63
Wrapper Class
A class that represents a primitive type when you want to be able to treat a primitive data type as though it is an object.
64
Autoboxing
The automatic conversion between a primitive value and a corresponding wraper object. Interger obj1; int num1 = 69; obj1 = num1; **// automatically creates an Integer object**
65
Unboxing
The reverse of autoboxing, automatically converts a wrapper object into a corresponding primitive value. Integer obj2 = new Integer(69); int num2; num2 = obj2; **// automatically extracts the int value**
66
constructor
A **special method** that has the **same name as the class** and is called when an object is created to set up the object initially.
67
equality operators
**==** Test whether two values are **equal** **!=** Test whether two values are **not equal**
68
relational operators
**\> **greater than **\<** less than **\>=** greater than or equal to \<= less than or equal to
69
logical operators
**!** logical NOT **&&** logical AND **||** logical OR
70
precidence for arithmetic and logical opperators
arithmetice operators have a **higher precidence** than relational operators and therefore are **performed before** the logical operators.
71
if-else statement
Do one thing if, else do another. ## Footnote if (height\<= MAX) adjust = 0; else adjust = MAX - height;
72
conditional operator
(total \> MAX) **?** total +1 **:** total \* 2; The entire conditional expression returns the value of the first expression if the condition is true, and returns the value of the second expression if the condition is false.
73
Nested if Statements
An if statement that is exicuted when another if statement is true. ## Footnote if (x = 10) if (y \>2)
74
Comparing Floats
**Rarely** is **==** used. A better way to check for a floating point equality is to compute the absolute value of the difference between the values and compare the result to some tolerace level. if(Math.abs(f1-f2) \< TOLERANCE) System.out.println("Essentially equal.");
75
Comparing Characters
characters can be compared using equality and rational operators as their "value" is based on their Unicode character position and value.
76
Comparing Strings
use .equals() to compare strings if(name1.equals(name2); **Note:** (name1 == name2) tests to see if both references refer to the same object or in other words, have the same reference location.
77
Used to determine the relative ordering of **two strings**
**compareTo()** name1.compareTo(name2); Returns a **negative** value if name1 comes **before** name2. Returns **zero** if name1 is **the same** as name2. Returns a **positive** value if name1 comes **after** name2.
78
The switch Statement
Causes executing program to follow one of several paths based on a single value (Must be of type char, byte, short, or int). switch (idChar) { case 'A': aCount++; break; case 'B': aCount++; break; and so on. If no case is match then continues on to the **default case**. Such as: default: noCaps++; } If no **default** is used, the program continues on with executing any of the switch statements.
79
The while Statement
A loop that eveluates a boolean condition just as an if statment does and executes a statment repeatedly until the statement is nolonger true. ## Footnote int count =1; while (count \<= 5) { System.out.println(count); count++; }
80
infinite loop
A conditional loop that does not become false and therefore continues to execute forever or until it is stopped.
81
Nested Loops
A loop inside of a loop. ## Footnote int count 1 = 1, count2; while (count1 \<= 10){ count2 = 1; while (count2 \<= 50){ System.out.println("Here again"); count2++; } count1++; }
82
iterator
An object that has methods that allow you to process a collection of items one at a time. An example is the Scanner class. All iterators have methods such as next() and hasnext().
83
reading text files
fileScan = new Scanner(new File("websites.inp")); while (fileScan.hadNext()){ url = fileScan.nextLine(); System.out.printlin("URL: " + url); }
84
The do Statement
The *do* Statement is similar to the *while* statement in that it executes the loop body until a condition becomes *false*. However, unlike the *while* loop, the conditiona of a *do* loop is evaluated ***after*** the loop body executes. This ensures that it will happen **at least once**. ## Footnote int count = 0; do{ count++; System.out.println(count); } while (count \< 5);
85
The *for* Statement
A repetition statement that is particularly well suited for executing the body of a loop a **specific** number of times. ## Footnote for (int count = 1; count \<= 5; count++) System.out.println(count);
86
scope of a variable
The location at which a variable is declared defines its scope.
87
instance data
Attributes that are reserved menory space every time an instance of the class is created. Each object can store different values for its instance data.
88
UML
Unified Modeling Language
89
encapsulation
The characteristic of class such that is it difficult, if not impossible, for code outside of the class to "reach in" and change the value of a variable that is declared inside the class.
90
modifier
A Java reserved word that is used to specify particular characteristics of a programing language construct.
91
Visibility Modifiers
* public - it can be directly referenced from outside the object. * Methods that provide services to the client must be declared public. * private - it can be used anyware inside the class deffinition but cannot be referenced externally. * Instance variables should be declared private. * protected - relevent only in the context of inheritance.
92
Service methods
Methods of the class that are declared public and used to provide services to other classes.
93
Support methods
Private methods that can only be used by the other methods of the class to perform a task.
94
UML class diagram symbol for a public member
+, such as: + toString()
95
UML class diagram symbol for a private member
- , such as: - randInt()
96
Accessor method
Another term for a getter, used to provide read-only access to a particular value. getHeight();
97
Mutator method
Another term for a setter, used to change a particular value. setHeight();
98
method declaration
Specifies the code executed when the method is invoked.
99
header of a method
Includes the type of return value, the method name, and a list of parameters that the method accepts. Example: public int computeArea (int length, int width){ }
100
driver programs
A program that has the sole purpose of driving the use of other, more interesting parts of other porgrams. Often used for testing purposes.
101
The return Statement
The return type specified in the method header can be a primitive type, a class name, or the reserve word *void.*
102
void
Used when a method does not return any value.
103
return Statement Guidlines
* A method that returns a value *MUST* have a return statement. * When a return statement is executed, control is immediately returned to the statement in the calling method. * A return statement consists of the reserved word *return* followed by an expression that didcated the value to be returned. The expression must be consistent with the return type specified in the method header. * A method that does not return a value usually does not contain a return statement. * It is usually not good practice to use more than one return statement in a method. It should be located at the end of the method unless do so will make the method overly complex.
104
parameter
A value that is passed into a method when the method is invoked. Parameters provide data to a method that allow the method to do its job.
105
parameter list
In the header of a method declaration, specifies the type of each value that is passed into the method, and the name by which the called method will refer to each value.
106
formal parameters
* The names of the parameters in the header of the method declaration. * Serve as variables inside the method and whose initial values come from the actual parameters in the invocation.
107
local data
* A variable declared inside a method. * Can not be referenced from outside the method.
108
static method
* A method that is invoked through its class name, instead of through an object of that class. * As in: * (static) dvd.getTitle(); vs. * dvd Matrix = new dvd("Matrix", 1999) * Matrix.getTitle();
109
static variable
* Sometimes called a *class variable, *is shared amoung all instances of a class. * Only one copy of a static variable for all objects. * Changing the value of a static variable in one object changes it for all of the objects. * Memory space is reserve regardless, even if it is never used. * Local variables cannot be static.
110
dependency
* One class relies on another. * A "uses" relationship. * Normally established when one class invokes one or more methods of another class.
111
aggregation
* When an object is made up other objects. * a "has-a" relationships
112
aggregate object
Any object that contains references to other objects.
113
*this* Reference
* A reserve word in java. * It allows an object to refer to itself. * Often used to distinguish between a local variable and the variable with the same name that belongs to the particular object. * Often used to distinguish the parameters of a constructor from their corrisponding instance variables with the same names. * if (this.position == piece2.position) result = false:
114
algorithm
A step-by-step process for solving a problem.
115
method overloading
Using the same method name with different parameter lists for multiple methods.
116
method's signature
The method's name, along with the number, type, and order of its parameters.
117
inheritance
* The process in which a new class is derived from an existing one. * The new class automatically contains the variables and methods in the original class. * To tailor the new class as needed, new variables and methods are added.
118
parent class
* Also know as a superclass, or base class. * The class used to derive a new class.
119
child class
* The new class derived from a parent class. * Also known as a subclass. * The child class "is-a" more specific version of the parent class.
120
*protected* Modifier
* Allows derived class to reference the variable or method from the parent class. * Allows the class to retain some encapsulation properties. * May be accessed by any class in the same package.
121
*super* Reference
* Can be used in a class to refer to the parent class. * Commonly used to invoke a parent classes constructor. * Example: super (numPages);
122
overriding Methods
When a child class defines a method with the same name and signature as a method in the parent class.
123
overloading Methods
A method in the child class that has the same name as a method in the parent class but a different signature.
124
Abstract class
* An abstract entity that is usually insuficiently defined to be used by itself. * Just like any other class, except that it may have some methods that have not been defined yet. * It is up to the child class to define these methods or it too will become an abstract class. * Not all methods need be undefined.
125
Private members
Exist for an object of a derived class, even though they can't be referenced directly.
126
restricting inheritance **(final)**
* Can be used to **curtail** the abilities related to **inheritance**. * A **final method** is often used on insist that particular functionality be used in all child classes. * A **final class** cannot be extended at all.
127
Polymorphism
Having many forms
128
Polymorphic reference
A reference variable that can refer to different types of objects at different points in time.
129
Dynamic binding or late binding
The method definition that is used is determined by the type of the object being referenced.
130
Binding
Tying a method invocation to a method definition.
131
Interface
* A collection of constants and abstract methods. * A class can implement multiple interfaces. * Example: * ​class ManyThings implements Interface1, Interface2, Interface 3
132
Abstract method declaration
Methods must be declared with the same signatures as their abstract counterparts in the interface.
133
Abstract/interface constants
An interface can contain constants defined using the *final* modifier that can be inherit as well.
134
interface hierarchy
* Inheritance relationships between interfaces similar to those for classes. * Class hierarchies and interface hierarchies do not overlap. That is, an interface cannot be used to derive a class, and a class cannot be used to derive an interface.
135
*Comparable* **Interface**
* Contains only the *compareTo()* method. * Takes an object as a parameter and returns an integer. * if(obj1.compareTo(obj2) \< 0); System.out.println("obj1 is less than obj2"); * int t = obj1.compareTo(obj2); * integer returned is: * obj1 \< obj2, t = negative * obj1 = obj2, t = 0 * obj1 \> obj2, t = positive *
136
*Iterator* Interface
* Used by a class that represents a collection of objects, providing a means to move through the collection one object at a time. * The primary methods * hasNext(); * returns true if yes * next(); * returns the next object. * remove(); * removes the object that was most recently returned by the *next()* method.
137
cast an object into the appropriate reference
((Philosopher) specail).pontificate();
138
Exception
An object that defines an unusual or erroneous situation.
139
Error
Similar to an exception, except that an error generally represents an unrecoverable situation and should not be caught.
140
try-catch Statement
Identifies a block of statements that may throw an exception.
141
catch clause
Follows a try block and defines how a particular kind of exception is handled.Also called an exception handler
142
exception handler
Follows a try block and defines how a particular kind of exception is handled.Also called a catch clause.
143
finally clause
An optional end to a try-catch statement.Defines a section of code that is executed no matter how the try block is exited.
144
exception propagation
If an exception is not caught and handled in the method where it occurs, control is immediately returned to the method that invoked the method that produced the exception. If it isn't caught there, control returns to method that called it, and so on until it is passed out of the main method and then the program is terminated.
145
Errors
* LinkageError * ThreadDeath * VirtualMachineError * AWTError
146
Exceptions
* IllegalAccessException * NoSuchMethodException * ClassNotFoundException
147
RuntimeExceptions
* ArithmeticException * IndexOutOfBoundsException * NullPointerException
148
checked exception
Must either be caught by a method or be listed in the throws clause of any method that may throw or propagate it.
149
throws clause
Appended to the header of a method definition to formally acknowledge that the method will throw or propagate a particular exception if it occurs.
150
unchecked exception
Requires no throws clause.The only unchecked exceptions in Java are objects of the type RuntimeException or any of its descendants: ## Footnote * ArithmeticException * IndexOutOfBoundsException * NullPointerException
151
stream
An ordered sequence of bytes.
152
input stream
From which we read information
153
output stream
To whih we write information.
154
Asymptotic complexity of an algorithm
* The general nature of the function as *n* increases. * Also called the *order* of the algorithm * Not affected by constants
155
dominant term
The term that increases most quickly as n increases.
156
order of an algorithm
* The general nature of the function as *n* increases. * Also called the *Asymptotic complexity* of the algorithm * Not affected by constants
157
Determining Time Complexity - Loops
Loops have a time complexity of O(*n*).
158
Determining Time Complexity - Nested Loops
Nested loops have a time complexity of O(*nx*). Where *x* is the number of loops in the nest. The follow example would be O(n3): * for (int count = 0; count \< n; count++){ * for(int count2 = 0; count \< n; count2++){ * for(int count3 = 0; count \< n; count3++){ * /\* some sequence of O(1) steps \*/ * } * }
159
Determining Time Complexity - Method Calls
The order of method calls must be determined before the order of the code segment calling the method can be determined. Once you have the method complexity, multiply this by the # of times the loop will execute.
160
collection
An object that gathers and organizes other objects. It defines the specific ways in which those objects can be accessed and managed. The user of a collection, which is usually another class or object in the software system, must interact with the collection only in the prescribed ways.
161
elements
The objects inside of a collection.
162
Collection categories
linear & nonlinear
163
linear collection
A collection in which the elements of the collection are organized in a straight line.
164
nonlinear collection
A collection in which the elements are organized in something other than a straight line, such as a hierarchy or a network or no organization at all.
165
The organization of the elements in a collection, relative to each other, is usually determined by one of two things:
* The order in which they were added to the collection. * Some inherent relationship among the elements themselves.
166
Exception
An object that defines an unusual or erroneous situation.
167
Error
Similar to an exception, except that an error generally represents an unrecoverable situation and should not be caught.
168
try-catch Statement
Identifies a block of statements that may throw an exception.
169
catch clause
Follows a try block and defines how a particular kind of exception is handled.Also called an exception handler
170
exception handler
Follows a try block and defines how a particular kind of exception is handled.Also called a catch clause.
171
finally clause
An optional end to a try-catch statement.Defines a section of code that is executed no matter how the try block is exited.
172
exception propagation
If an exception is not caught and handled in the method where it occurs, control is immediately returned to the method that invoked the method that produced the exception. If it isn't caught there, control returns to method that called it, and so on until it is passed out of the main method and then the program is terminated.
173
Errors
LinkageErrorThreadDeathVirtualMachineErrorAWTError
174
Exceptions
IllegalAccessExceptionNoSuchMethodExceptionClassNotFoundException
175
RuntimeExceptions
ArithmeticExceptionIndexOutOfBoundsExceptionNullPointerException
176
checked exception
Must either be caught by a method or be listed in the throws clause of any method that may throw or propagate it.
177
throws clause
Appended to the header of a method definition to formally acknowledge that the method will throw or propagate a particular exception if it occurs.
178
unchecked exception
Requires no throws clause.The only unchecked exceptions in Java are objects of the type RuntimeException or any of its descendants:ArithmeticExceptionIndexOutOfBoundsExceptionNullPointerException
179
Abstraction
Hides certain data types at certain times.
180
Data Type
A group of values and the operations defined on those values.
181
ADT
Abstract Data Type: A data type whose values and operation are not inherently defined within a programming language.It is abstract only in that the details of its implementation must be defined and should be hidden from the user.
182
data structure
The collection of programming constructs used to implement a collection.
183
API
Application Programming Interfaces: A set of classes that represent a few specific types of collections, implemented in various ways.
184
Stack
A linear collection whose elements are added to, and removed from, the same end.Last in, first out
185
Stack: push
Adds an element to the top of the stack.
186
Stack: pop
Removes an element from the top of the stack.
187
Stack: peek
Examines the elements at the top of the stack.
188
Stack: isEmpty
Determines if the stack is empty.
189
Stack: size
Determines the # of elements on the stack
190
Exception
An object that defines an unusual or erroneous situation.
191
To expand an array size:
private void expandCapacity(){ stack = Arrays.copyOf (stack, stack.length \* 2);}
192
liinked structure
A data structure that uses object reference variables to create links between objects. The primary alternative to an array-based implemenation of a collection.
193
self-referential object
One object contains a link to a second object which contains a link to another object which contains a link to another and so on.
194
linked list
A linked structure in which one object refers to the next, creating a linear ordering of the objects in the list. A dynamic structure - its size grows and shrinks as needed to accomodate the number of elements stored.
195
nodes
The term that is often used to refer to the objects stored in a linked list.
196
dynamic structure
A data structured the grows and shrinks in size as needed to accomodate the number of elements stored.
197
Accessing elements in a linked list
The only way to access the elements in a linked list is to start with the first element and progress through the list.
198
recursion
A process whereby a method calls itself either dirrectly or indirectly.
199
program stack
* Also known as a run-time stack, is used to keep track of methods that are invoked. * Every time a method is called, an activation record that represents the invocation is created and pushed onto the program stack. * Therefore, the elements on the stack represent the series of method invocations that occurred to reach a particular point in an executing program
200
call stack trace
A call that indicates what method a problem occured within and what method calls were made to arrive at that point.
201