Object-Oriented Programming Prelim Exam Flashcards

1
Q

Specifies all the information needed to call a method.

A

Method Declaration

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

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

A

Access Modifier

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

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

A

Return Type

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

Should follow the naming convention rules.

A

Method Name

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

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

A

Parameter List

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

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

A

Optional Exception List

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

Everything that is enclosed between braces.

A

Method Body

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

Public, private, protected, package-private

A

Access Modifiers

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

This modifier allows the method to be visible to all classes everywhere.

A

Public

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

This modifier specifies that the method can only be accessed in its own class.

A

Private

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

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

A

Protected

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

This modifier (no modifier) specifies that the member can only be accessed within its own package.

A

Package-private

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

Any field declared with the static modifier.

A

Static variable or variable

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

This belongs to the class rather than the object of a class.

A

Static Method

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

Any variable or method that is non-static.

A

Instance variable or method

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

Any variable that is declared outside any method, constructor, or block.

A

Instance variable

17
Q

The variables listed in a method declaration.

A

Parameters

18
Q

The actual values that are passed in when the method is invoked.

A

Arguments

19
Q

Consists of the method’s name and the parameter types.

A

Method Signature

20
Q

Occurs when there are different method signatures with the same name but different type parameters.

A

Method Overload

21
Q

The automatic conversion that the Java compiler makes between the primitive types and their corresponding object wrapper classes.

A

Autoboxing