Chapter 2 Definitions

Field: Stores data for an object to use.

Instance Variable: Another name for fields.

Constructor: Allows each object to be set up properly when it is first created.

Method: Consists of two parts, a header and a body.

Method Signature: The fourth line in a method.

Method Body: What the method will actually do.

Parameter: The way in which both constructors and methods receive values is via their parameters.

Accessor: Return information to the caller about the state of an object.

Mutator: Methods that change the state of their objects.

Declaration: Define what happens inside an object when that method is called.

Initialization: Responsible to put each object of that class into a fit state to be used once it is created.

Block: A pair of matching curling brackets.

Statement: Defines what happens inside an object when that method is called.

Assignment Statement: Store the value represented by the right-hand side of the statement in the variable named on the left.

Conditional Statement: takes one of two possible actions based upon the result of a test.

Return Statement: Responsible for returning information in the method’s signature.

Return Type: Defines what kind of information is returned.

Comment: An added line of text for the benefit of human readers of the class definition.

Expression: Things that compute values.

Operator: A symbol that initiates something, Example +=.

Variable: An amount.

Local Variable: A variable declared and used within a single method.

Scope: defines the section of source code from where the variable can be accessed.

Lifetime: how long the variable exists before it is destroyed.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.