Designing Methods Vocabulary

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/15

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering Java method declarations, optional specifiers, access modifiers, and method components.

16 Terms

1
New cards

Method declaration

Specifies all the information needed to call a method.

2
New cards

Access modifier

Specifies whether other classes can use a particular field or invoke a particular method.

3
New cards

static

An optional specifier used for class methods.

4
New cards

abstract

An optional specifier used when a method does not have a body.

5
New cards

final

An optional specifier used when a method is not allowed to be overridden by a subclass.

6
New cards

Return type

The data type of the value returned by the method, or void if the method does not return a value.

7
New cards

Method name

The identifier of a method that should be a lowercase verb (ex. run) or a multi-word name beginning with a lowercase verb followed by capitalized words (ex. runFast).

8
New cards

Parameter list

A comma-delimited list of input parameters, preceded by their data types and enclosed by parentheses.

9
New cards

Optional exception list

Indicates that the method might throw one of the listed exception types.

10
New cards

Method body

Everything that is enclosed between braces, containing the method's code including the declaration of local variables.

11
New cards

Top level access control

Level of access control that can be public or package-private.

12
New cards

Member level access control

Level of access control that can be public, private, protected, or package-private.

13
New cards

Public modifier

Allows the method to be visible to all classes everywhere.

14
New cards

Private modifier

Specifies that the method can only be accessed in its own class.

15
New cards

Protected modifier

Specifies that the member can only be accessed within its own package and by a subclass of its class in another package.

16
New cards

Package-private modifier

Specifies that the member can only be accessed within its own package (used when no modifier is specified).