Types of Methods Flashcards
1
Q
constructor
A
A method that has the same name of its class and is used to create an object of the class including its attributes and behavior. A constructor does not have a return type
2
Q
No argument constructor
A
A constructor that doesn’t have any parameters.
3
Q
method signature
A
The first line of a method that contains return type, name and parameters.
4
Q
main method
A
A method that executes the class code. The execution begins with the main method.
5
Q
overloaded method
A
Multiple methods with the same name but different numbers of parameters.
6
Q
Parameters
A
A variable that will hold input for a method
7
Q
Arguments
A
The data that goes into a parameter.
8
Q
static method
A
Belongs to the class, does not have to have an instance of it to use it. Can be used by calling class name.