Methods Flashcards

1
Q

Methods only run when ________.

A

Called

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

What is passed data in a method referred to as?

A

Parameters

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

What is the difference between Static and Void in method callings?

A

Static: The method belongs to the Class rather than being an object of the class.

Void: The method has no return type or value.

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

What does the keyword Static mean in Java?

A

Unchanging.

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

What are the 6 access modifiers for methods?

A
  1. Public
  2. Private
  3. Protected
  4. Private Protected
  5. Friendly
  6. Static
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What happens after a Return statement in a method?

A

The method will end (anything after the Return statement will not be executed).

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

What happens after a Return statement in a method?

A

The method will end (anything after the Return statement will not be executed).

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