MODULE (4) Week 5 - Methods, Arrays, Arrays as Objects Flashcards

1
Q

A program module. It contains a series of statements and carries out a task

A

Method

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

Executing a method

A

Invoke or call from another method

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

Makes a method call

A

Calling method (client method)

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

Invoked by a calling method

main() method executes automatically

A

Called method

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

A method must include:

A

A method header (declaration)
A method body (implementation)

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

The method header contains:

A

Optional access specifiers
A return type
An identifier
Parentheses that might contain data to be sent to the method

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

Access specifier that allows use by any other class and is the most commonly used by methods

A

public access specifier

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

Describes the type of data the method sends back to the calling method

A

Return type

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

What is the return value of a method of no data is returned to the method?

A

void

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

Requirements for a method name

A

Must be one word
No embedded spaces
Cannot be a Java keyword

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

The part of a method heather that may contain data to be sent to the method

A

Parenthesis

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

Data items you use in a call to a method

Data items received by the method

A

Parameters

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

The only part of a method that
the client sees or with which it
interacts

A

Interface

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