Key Concepts Flashcards

1
Q

Main memory is volatile…

A

meaning the stored information is maintained only as long as electric power is supplied.

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

A do statement excutes its loop body…

A

at least once.

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

When an ArrayList object is created you must specify…

A

the type of element that will be stored in the list.

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

A switch statement matches a …

A

character or integer value to one of several possible cases

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

A while statement executes the same statement …

A

until its condition becomes false

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

What method can be used to determine the relative order of Strings?

A

the compareTo() method

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

In a nested if statement, an else clause is matched to the closest unmatched…

A

if

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

A constructor cannot have any

A

return type, even void

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

A variable declared in a method is…

A

local to that method and cannot be used outside of it

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

Instance variables should be declared with …

A

private visibility to promote encapsulation

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

The value returned from a method must be consistent …

A

with the return type specified in the method header.

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

A wrapper class

A

allows a primitive value to be managed as an object

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

printf method

A

was added to Java to support the migration of legacy systems

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

A pseudorandom number generator

A

performs a complex calculations to create the illusion of randomness.

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

Java uses the…

A

16-bit Unicode character set to represent character data.

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

Java has two kinds of numeric values…

A

integer and floating point. There are four integer types and two floating point data types.

17
Q

A class is a…

A

blueprint of an object. Multiple objects can be created from one class definitions

18
Q

Each object has a …

A

state, defined by its attributes, and a set of behaviors, defined by its methods

19
Q

A java program must be syntactically correct or …

A

the compiler will not produce bytecode