Chapter 6 T/F

Ace your homework & exams now with Quizwiz!

An object can store data.

True

A method that gets a value from a class's field but does not change it is known as a mutator method.

False

Instance methods should be declared static.

False

The public access specifier for a field indicates that the attribute may not be accessed by statements outside the class.

False

The term "default constructor" is applied to the first constructor written by the author of a class.

False

When a local variable in an instance method has the same name as an instance field, the instance field hides the local variable.

False

A class is not an object, but a description of an object.

True

A constructor is a method that is automatically called when an object is created.

True

A method that stores a value in a class's field or in some other way changes the value of a field is known as a mutator value.

True

An access specifier indicates how the class may be accessed.

True

Instance methods do not have the key word static in their headers.

True

Shadowing is the term used to describe where the field name is hidden by the name of a local or parameter variable.

True

The java.lang package is automatically imported into all Java programs.

True

The term "no-arg constructor" is applied to any constructor that does not accept arguments.

True


Related study sets