Types of Methods Flashcards

You may prefer our related Brainscape-certified 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

No argument constructor

A

A constructor that doesn’t have any parameters.

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

method signature

A

The first line of a method that contains return type, name and parameters.

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

main method

A

A method that executes the class code. The execution begins with the main method.

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

overloaded method

A

Multiple methods with the same name but different numbers of parameters.

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

Parameters

A

A variable that will hold input for a method

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

Arguments

A

The data that goes into a parameter.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

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