Chapter 7 Flashcards

1
Q

All the data that stored in __ must be of the same type

A

ARRAY

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

In java, an array is a special kind of ____ , but its more useful to think of it as a ____ of variables of the same type

A

object, collection

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

an array is consisting of a collection of seven variables of type double can be created as follows:

A

double[] temperature = new double[7];

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

Variables like temperature[0] and temperature[1] are called:

A

array elements

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

Note that the numbering starts at ___

A

0

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

True or False, Each of these seven variables can be used just like any other variable of type double

A
temperature[3] = 32; 
temperature[6] = temperature[3] + 5; System.out.println(temperature[6]);
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

You create an array in the same way that you would create an object of a class type using the operation new . When creating an array of elements of type Base, the syntax would be:

A

Base[] Array_Name = new Base[Length];

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

The following creates an array named pressure that is equivalent to 100 variables of type int:

A

int[] pressure = new int[100];

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

An array could be broken down into 2 steps:

A

int[] pressure;

pressure = new int[100];

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

True or false, this simple array pressure has length of 100, which means it has indexed variables pressure[0] to [99]

A

True

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

An array has only one public instance variable, namely the variable__

A

length

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

u can use the __ operator to give an array more than one name

A

assignment

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

______ allows you to define a very general class and then later define more specialized classes that add some new details to the existing general class definition.

A

Inheritance

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

True or False, A derived class is also called a subclass, a child class, and a descendant class

A

True

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

if the method in the derived class were to have the same name and the same return type but a different number of parameters or a parameter of a different type from the method in the base class, the method names would be _____.

A

overloaded

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