Question: QUESTION 1 The Integer and Character classes are examples of ____ framework classes hover classes wrapper classes None of the above 0.5 points QUESTION 2

QUESTION 1

The Integer and Character classes are examples of ____

framework classes

hover classes

wrapper classes

None of the above

0.5 points

QUESTION 2

You can make a variable defined within a method be available outside that method by including the word public in that variable's declaration.

True

False

0.5 points

QUESTION 3

A method that reads one of an objects data items is called a mutator.

True

False

0.5 points

QUESTION 4

What's the final value of x after the following code fragment is executed?

int x=1;

do{

x = x*2;

} while(x>=10);

8

16

2

None of the above

0.5 points

QUESTION 5

Normally, you should use the private access modifier for class variables.

True

False

0.5 points

QUESTION 6

Given a class with a class variable. All of the class's objects get a seperate copy of the class variable.

True

False

0.5 points

QUESTION 7

For each class Java automatically provides a zero-parameter constructor that is always available unless you override it with an explicitly defined a zero-parameter constructor.

True

False

0.5 points

QUESTION 8

When you pass a reference to a method, you enable the method to modify the referenced object.

True

False

0.5 points

QUESTION 9

It's good practice to make constants as local as possible.

True

False

0.5 points

QUESTION 10

A class constant should be initialized within a constructor.

True

False

0.5 points

QUESTION 11

Given an array that's named myArray, you access the first element in the array using myArray(0).

True

False

0.5 points

QUESTION 12

Method parameters persist for as long as the method is executing

True

False

0.5 points

QUESTION 13

The least encapsulated type of variable is a class (or static) variable.

True

False

0.5 points

QUESTION 14

The array object created with new automatically keeps track of the number of its elements that have been initialized.

True

False

0.5 points

QUESTION 15

What is the name of the class that contains the abs, min, and round method?

Arithmetic

Math

Number

None of the above

0.5 points

QUESTION 16

It's legal to store ints and also doubles in a single standard array.

True

False

0.5 points

QUESTION 17

1. If a method accesses a class variable If If a method accesses a class variable and also an instance variable, the method:

Must be a local method

Must be an instance method

Must be a class method

Can be either a class method or an instance method it depends on other factors.

0.5 points

QUESTION 18

If the name of an argument in a method call is the same as the name of the corresponding parameter in the method's definition, changing that parameter's value inside the method also changes the value of the corresponding argument in the calling program.

True

False

0.5 points

QUESTION 19

Typically, _______ modifier identifies a helper method.

private

public

static

all of the above

0.5 points

QUESTION 20

Initially, you may include a main method in the same class as the code it drives, but if you want to drive that code later from a main method in a separate driver class, you must first remove the local main method.

True

False

0.5 points

QUESTION 21

You should use static variables to represent properties of individual objects.

True

False

0.5 points

QUESTION 22

Instance variables persist for as long as the object exists.

True

False

0.5 points

QUESTION 23

Assigning one reference variable to another copies the right-side object's instance variables into the left-side object's instance variables.

True

False

0.5 points

QUESTION 24

A class is a group of two or more objects.

True

False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!