Professional Documents
Culture Documents
https://testbankfan.com/download/java-programming-7th-edition-joyce-farrell-test-ban
k/
TRUE/FALSE
2. The legal integer values are -231 through 231-1. These are the highest and lowest values that you can
store in four bytes of memory, which is the size of an int variable.
3. Multiplication, division, and remainder always take place after addition or subtraction in an
expression.
6. Once a variable has been declared and initialized, new values may not be assigned to the variable.
7. The expression boolean isTenLarger = (10 < 5) will produce a value of true.
8. Even if a statement occupies multiple lines, the statement is not complete until the semicolon is
reached.
10. Constants hold a single value for the duration of the program execution.
MULTIPLE CHOICE
2. A ____ is a named memory location that you can use to store a value.
a. cast c. reference
b. variable d. primitive
ANS: B PTS: 1 REF: 52
3. Primitive types serve as the building blocks for more complex data types, called ____ types.
a. integer c. reference
b. literal d. data
ANS: C PTS: 1 REF: 52
4. ____ refers to the order in which values are used with operators.
a. Associativity c. Declaration
b. Initialization d. Floating
ANS: A PTS: 1 REF: 53
5. In Java, you use variables of type ____ to store integers, or whole numbers.
a. num c. var
b. double d. int
ANS: D PTS: 1 REF: 52
6. A(n) ____ variable can hold only one of two values: true or false.
a. integer c. true
b. boolean d. comparison
ANS: B PTS: 1 REF: 67
9. You use the ____ data type to hold any single character.
a. single c. byte
b. char d. float
ANS: B PTS: 1 REF: 70
10. In Java, ____ is a built-in class that provides you with the means for storing and manipulating
character strings.
a. Escape c. String
b. Type d. Character
ANS: C PTS: 1 REF: 72
11. You can store any character, including nonprinting characters such as a backspace or a tab, in a(n)
____ variable.
a. int c. boolean
b. char d. set
ANS: B PTS: 1 REF: 73
12. The characters ____ move the cursor to the next line when used within a println() statement.
a. /n c. .+
b. \n d. $
ANS: B PTS: 1 REF: 73-74
13. In Java, when a numeric variable is concatenated to a String using the ____, the entire expression
becomes a String.
a. plus sign c. concatenate statement
b. equal sign d. string statement
ANS: A PTS: 1 REF: 56
14. You use ____ operators to perform calculations with values in your programs.
a. calculation c. integer
b. arithmetic d. precedence
ANS: B PTS: 1 REF: 91
17. What is the value of result after the following statement is executed?
int result = 2 + 3 * 4;
a. 9 c. 14
b. 10 d. 20
ANS: C PTS: 1 REF: 93
18. The ____ is the type to which all operands in an expression are converted so that they are compatible
with each other.
a. unifying type c. numbered
b. data type d. primitive
ANS: A PTS: 1 REF: 99
19. A(n) ____ dialog box asks a question and provides a text field in which the user can enter a response.
a. question c. confirm
Another random document with
no related content on Scribd:
defeats Porras, 261.
Columbus, Christopher, born, 1;
translated, 3;
anecdotes of boyhood, 5;
goes to Pavia, 9;
becomes sailor, 11;
engages in Neapolitan expedition, 12;
deceives sailors or posterity, 13;
does not arrive in Portugal, 16;
does arrive there, 18;
marries, 19;
makes maps, 20;
lives at Porto Santo, 21;
goes to Iceland or elsewhere, 28;
talks to King John, 35;
goes to Spain, 38;
deposited with Quintanilla, 41;
meets Scientific Congress, 43;
goes to Convent of Rabida, 49;
meets committee on exploration, 54;
starts for France, 56;
goes to Palos, 61;
sails on first voyage, 67;
keeps false reckoning, 72;
discovers San Salvador, 89;
sails for Spain, 97;
wrecked, 102;
founds colony, 105;
sees Mermaids, 110;
displays seamanship, 115;
arrives at Azores, 116;
arrives at Palos, 125;
flattens egg, 135;
sails on second voyage, 138;
discovers Dominica, 141;
returns to Spain, 191;
loses popularity, 196;
sails on third voyage, 200;
discovers Trinidad, 204;
invents ingenious theory, 205;
arrives at Hispaniola, 208;
arrested, 228;
sent to Spain, 229;
arrives in Spain, 230;
sails on fourth voyage, 237;
reaches Honduras, 240;
searches for Panama Canal, 240;
founds colony at Veragua, 243;
sails away, 250;
reaches Jamaica, 251;
manages lunar eclipse, 258;
reaches Hispaniola, 262;
returns to Spain, 264;
dies, 268;
is extensively buried, 268;
perhaps is a sun-myth, 269;
character, 284.
Columbus, Diego, born, 4;
Governor of Isabella, 162;
sent to Spain to wait for opening in Connecticut, 177;
returns to Hispaniola, 187;
arrested by Bobadilla, 227.
Columbus, Dominico, combs wool, 3.
Compass, variation of, 55.
Congress of Salamanca, 46;
its tediousness, 45.
Correo, Pedro, 21;
he winks, 25;
is talked to death, 34.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must, at
no additional cost, fee or expense to the user, provide a copy, a
means of exporting a copy, or a means of obtaining a copy upon
request, of the work in its original “Plain Vanilla ASCII” or other
form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive from
the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.