Home
Explore
Exams
Search for anything
Search for anything
Login
Get started
Home
Java Midterm
Studied by 0 people
0.0
(0)
Add a rating
Learn
A personalized and smart learning plan
Practice Test
Take a test on your terms and definitions
Spaced Repetition
Scientifically backed study method
Matching Game
How quick can you match all your cards?
Flashcards
Study terms and definitions
1 / 222
There's no tags or description
Looks like no one added any tags here yet for you.
223 Terms
View all (223)
Star these 223
1
Class
A blueprint for creating objects, providing initial state (data) and behavior (methods) for those objects.
New cards
2
Object
An instance of a class that has state and behavior defined by its class.
New cards
3
Encapsulation
The practice of restricting access to certain details of an object, exposing only what is necessary for an external interface.
New cards
4
Instance Data
Variables declared at the class level, unique to each object instance.
New cards
5
Constructor
A special method used for initializing new objects of a class, having the same name as the class.
New cards
6
Accessor Method
A method that returns the value of an instance variable.
New cards
7
Mutator Method
A method that changes the value of an instance variable.
New cards
8
Visibility Modifiers
Keywords in Java that control the accessibility of classes, methods, and variables (e.g., public, private, protected).
New cards
9
UML Class Diagram
A graphical representation of a class, its attributes, operations, and relationships with other classes.
New cards
10
ToString Method
A method that returns a string representation of an object, useful for debugging and logging.
New cards
11
Black Box
An encapsulated object that hides its internal workings, exposing only methods for interaction.
New cards
12
Local Data
Variables declared within a method, accessible only within that method.
New cards
13
Public Method
A method that can be called from outside the class, typically exposing the object's services.
New cards
14
Private Variable
A variable that can only be accessed within its own class, enforcing encapsulation.
New cards
15
MAX (in context of Die class)
A constant representing the maximum face value of a die, typically set to 6.
New cards
16
Support Method
A method that assists a service method but is not intended to be called by clients.
New cards
17
Expression
A combination of one or more operators and operands.
New cards
18
Arithmetic Operators
Operators used to perform arithmetic calculations: addition (+), subtraction (-), multiplication (*), division (/), and remainder (%)
New cards
19
Operator Precedence
A set of rules that determines the order in which operators are evaluated in expressions.
New cards
20
Remainder Operator (%)
Returns the remainder after dividing the first operand by the second.
New cards
21
Increment Operator (++)
An operator that increases the value of a variable by one.
New cards
22
Decrement Operator (--)
An operator that decreases the value of a variable by one.
New cards
23
Assignment Operator (=)
An operator that assigns the value of the right-hand side expression to the variable on the left-hand side.
New cards
24
Casting
The process of converting one data type into another by explicitly specifying the type.
New cards
25
Data Conversion
The process of converting data from one type to another, like treating an integer as a floating-point value.
New cards
26
Widening Conversion
A safe conversion from a smaller data type to a larger data type.
New cards
27
Narrowing Conversion
A conversion from a larger data type to a smaller data type, which can lead to loss of information.
New cards
28
Scanner Class
A class in Java that is used to read input values of various types from different sources.
New cards
29
nextLine() Method
A method of the Scanner class that reads an entire line of text until the end of the line.
New cards
30
Tokens
Elements separated by white space in the input, such as spaces, tabs, and new line characters.
New cards
31
Promotion
Automatic conversion of one data type to another during operations, usually from a smaller to a larger type.
New cards
32
Assignment Conversion
Occurs when a value of one type is assigned to a variable of a different type, allowing only widening conversions.
New cards
33
Character String
A sequence of characters treated as a single data type in programming.
New cards
34
String Literal
A fixed value represented by characters enclosed in double quotes.
New cards
35
println Method
A method used to print a string followed by a new line in Java.
New cards
36
print Method
A method used to print a string without advancing to a new line in Java.
New cards
37
String Concatenation Operator
The + operator used to combine two strings or a string with another data type.
New cards
38
Variable
A named storage location in memory that holds a value.
New cards
39
Assignment Statement
A statement that changes the value of a variable using the = operator.
New cards
40
Constant
An identifier whose value cannot be changed after its initial assignment.
New cards
41
Primitive Data Type
The basic data types provided by Java: byte, short, int, long, float, double, char, boolean.
New cards
42
Boolean Value
A value that represents either true or false.
New cards
43
Escape Sequences
Special character sequences in strings that represent characters that are not directly printable.
New cards
44
Character Set
An ordered list of characters, with each character assigned a unique number.
New cards
45
ASCII
A character encoding standard that uses a subset of Unicode, representing characters with 7 bits.
New cards
46
Unicode
A character encoding standard that defines characters for most of the world's writing systems using 16 bits.
New cards
47
do Statement
A statement that executes a block of code once and then repeats based on a condition.
New cards
48
do loop
A loop that ensures the body is executed at least once before the condition is checked.
New cards
49
for loop
A loop that consists of initialization, condition evaluation, and increment; executes a block of code multiple times.
New cards
50
syntax of a do statement
do { statement-list; } while (condition); The statement-list is executed once, then repeats until the condition is false.
New cards
51
conditional statement
A programming statement that executes based on a specified boolean condition.
New cards
52
initialization in a for loop
The part of a for loop where variables are initialized before execution.
New cards
53
increment in a for loop
The operation that updates the looping variable after each iteration.
New cards
54
infinite loop
A loop that never terminates because the condition for exiting is never met.
New cards
55
for-each loop
A loop designed to iterate over elements in a collection without explicitly managing the iterator.
New cards
56
while loop vs do loop
A while loop checks the condition before executing the body, while a do loop executes the body once before checking the condition.
New cards
57
Java Loops
Statements in Java that allow executing a block of code multiple times based on a condition.
New cards
58
Repetition Statements
Statements that execute a code block repeatedly; often referred to as loops.
New cards
59
While Loop
A loop that executes as long as the specified condition evaluates to true.
New cards
60
Boolean Expressions
Expressions that evaluate to either true or false, controlling the logic of loops and conditionals.
New cards
61
Sentinel Value
A special input value used to signify the end of data input.
New cards
62
Infinite Loop
A loop that does not terminate because the loop condition remains true indefinitely.
New cards
63
Input Validation
The process of ensuring that user input is correct and falls within acceptable limits.
New cards
64
Nested Loops
A loop inside another loop, where the inner loop executes completely for each iteration of the outer loop.
New cards
65
Running Sum
A cumulative total that updates as new values are inputted into a program.
New cards
66
Palindrome
A word, phrase, or sequence that reads the same backward as forward.
New cards
67
Comparing Data
The process of evaluating and relating information using boolean expressions in programming.
New cards
68
Floating Point Values
Numerical values with decimal points; comparisons using == can lead to inaccuracies.
New cards
69
Tolerance
A threshold value determining if two floating point numbers are considered equal based on their closeness.
New cards
70
Unicode
A standardized character encoding system that assigns numerical values to characters for consistent representation.
New cards
71
Lexicographic Ordering
Ordering based on the character set, not strictly alphabetical, where uppercase letters precede lowercase.
New cards
72
Equals Method
A method used in Java to compare two string objects for equality based on their character content.
New cards
73
Switch Statement
A control statement that chooses one of many options, based on the evaluation of an expression.
New cards
74
Break Statement
A command used in switch statements to terminate a case and prevent fall-through to subsequent cases.
New cards
75
ArrayList Class
A resizable array implementation in Java that allows storage and manipulation of lists of objects.
New cards
76
Generics
A feature in Java allowing the definition of classes, interfaces, and methods with placeholder types.
New cards
77
Conditional Operator
An operator that evaluates a boolean condition and returns one of two expressions based on that condition.
New cards
78
Wrapper Classes
Classes in Java that encapsulate primitive data types to be used as objects in data structures like ArrayList.
New cards
79
Conditional Statement
A statement that allows a choice between different actions based on a condition.
New cards
80
Boolean Expression
An expression that evaluates to either true or false, often using relational or equality operators.
New cards
81
if statement
A control structure that executes a statement if its boolean condition evaluates to true.
New cards
82
if-else Statement
A control structure that executes one statement if the condition is true, and another if it is false.
New cards
83
Logical Operators
Operators that combine boolean expressions: Logical AND (&&), Logical OR (||), and Logical NOT (!).
New cards
84
Block Statement
A group of statements enclosed in braces ({}) that can be used as a single statement in control structures.
New cards
85
Nested if Statement
An if statement that is placed inside another if statement, allowing for multiple levels of conditions.
New cards
86
Relational Operators
Operators used to compare two values, returning a boolean result:
New cards
87
Equality Operator
The operator (==) that checks if two values are equal.
New cards
88
Assignment Operator
The operator (=) that assigns a value to a variable.
New cards
89
Truth Table
A table that shows all possible true/false values for logical expressions.
New cards
90
Scanner
A class in Java used to read input from various sources, including user input.
New cards
91
NumberFormat
A class in Java that allows for formatting numbers, including currency.
New cards
92
MAX Constant
A constant used to represent the maximum boundary value in various conditions.
New cards
93
Random Class
A class in Java used to generate pseudo-random numbers.
New cards
94
Method Declaration
Specifies the code that will be executed when the method is invoked.
New cards
95
Method Header
Begins a method declaration and includes the method name, return type, and parameter list.
New cards
96
Return Type
Indicates the type of value that a method sends back to the calling location.
New cards
97
Void Return Type
Indicates that a method does not return a value.
New cards
98
Local Data
Variables declared inside a method, created each time the method is called and destroyed when finished.
New cards
99
Formal Parameters
Parameters specified in the method declaration that receive actual parameters during invocation.
New cards
100
Driver Program
A program that drives the use of other parts of a program, often used for testing.
New cards
Load more