7.1-1_Designing Methods Flashcards

1
Q

What are the (9) components of a method definition?

A
access modifier
optional specifier
return type
method name
parentheses
parameter-list
exception-list
curly braces
method body
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is called the method signature?

A

Method name + Parameter List

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

How to call a method?

A

To invoke a mehod, Just type its method-signature -> Its name, followed by the parameter list within parentheses.

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

What are two important method definition rules?

A

📝️⚠️ Java allows the Optional Specifiers to appear before the Access Modifier.
📝️⚠️ The return type goes to the left of the method’s name

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