Methods Flashcards
1
Q
Methods only run when ________.
A
Called
2
Q
What is passed data in a method referred to as?
A
Parameters
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.
4
Q
What does the keyword Static mean in Java?
A
Unchanging.
5
Q
What are the 6 access modifiers for methods?
A
- Public
- Private
- Protected
- Private Protected
- Friendly
- Static
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).
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).