[OOP] Flashcards - Module 2-3

1
Q

The most basic decision-making statement

A

if statement

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

for-loop component that is only executed once at the start of the loop.

A

initializer

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

for-loop component that performs the updates on certain variables that were used in the loop.

A

iterator

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

This statement is used in selecting one of many code blocks to be executed. It works by evaluating the ____ expression once. Then, the value of the expression is compared with the values of each case. If it matches the case, the associated block of code will be executed.

A

switch statement

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

2 major components of loops

A

Condition and Expression

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

values provided to a method when it is invoked. They supply the necessary information for the method to execute its intended operations.

A

Actual parameters or arguments

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

The ____ iterates through a block of code as long as a specified condition is true.

A

while loop

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

3 Crucial Roles of java

A

Modularity, Code Reusability, and Ease of Maintenance

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

four forms of the java loop construct

A

while loop, for loop, do-while loop, and for-each loop

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

They function as local variables within the method, receiving the values provided by actual parameters during method calls.

A

formal parameters

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

[syntax] method in Java

A

access_modifier return_type method_name(parameter_list);
//statements
return value; // only if return type not void

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

3 components of a for-loop

A

initializer, condition, and iterator

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

A unique identifier for the method, adhering to Java’s naming conventions for identifiers.

A

Method Name.

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

placeholders specified in the method’s declaration or definition.

A

formal parameters

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

In ____ loop, repetition is achieved by doing or executing the statement in the loop first, before checking the condition.

A

do-while

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

A set of input parameters (if any) that the method requires. If none are needed, empty parentheses are used.

A

Parameter List

17
Q

The statements inside an if/if-else statement are enclosed in _____

A

curly braces

18
Q

What does ASCII stand for?

A

American Standard Code for Information Interchange

19
Q

Defines the visibility and accessibility of the method. Common examples include public, private, and protected.

A

Access Modifier

20
Q

loop component that changes the value of the variable used in the condition above. This “change” should eventually lead to breaking the loop, and happens when the condition evaluates to false.

A

Expression

21
Q

The block of code where the method’s task is executed.

A

Method Body

22
Q

The ASCII Codes range for digits = ____, uppercase = ___, and lowercase letters

A

48-57 ; 65-90 ; 97-122

23
Q

for-loop component that behaves similarly with how the condition in the while loop behaves.

24
Q

[syntax] do-while loop structure

A

do {
statements
}while(condition);

25
Q

For methods with a non-void return type, the method must ____ of the specified type using the return statement.

A

return value

26
Q

a loop component that checks whether the repetition still needs to be executed.

27
Q

Specifies the data type of the value the method returns. If the method does not return a value, the void keyword is used.

A

Return type

28
Q

If a ___ keyword is reached, it breaks out of the switch block.

29
Q

tool used by programming languages to regulate how a program is executed in response to specific circumstances.

A

Control Statements

30
Q

the first character set (encoding standard) used between computers on the Internet.