• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 222 pages
Exam (elaborations)

Test Bank for Absolute Java 6th Edition by Walter Savitch, Kenrick Mock,ISBN:9780134041674 All Chapters 1-20 Fully Covered||COMPLETE GUIDE A+||.

Document preview thumbnail
Preview 4 out of 222 pages

Test Bank for Absolute Java 6th Edition by Walter Savitch, Kenrick Mock,ISBN:9780134041674 All Chapters 1-20 Fully Covered||COMPLETE GUIDE A+||.

Content preview

N
Chapter 1 Getting Started 1




U
R
SI
N
G
Chapter 1




BY
Getting Started




TE
S
◼ Multiple Choice
1) Java is an object-oriented programming language. An object-oriented language
(a) Uses structured programming.
(b) Views a program as consisting of objects which communicate through interactions.
(c) Functionally breaks down problems into smaller, more manageable problems.
(d) All of the above.
Answer: B

2) In Java, the equal sign is used as the ___________ operator.
(a) increment
(b) decrement
(c) assignment
(d) negation
Answer: C

3) In Java, source code is compiled into object code called ______________.
(a) Bit-code
(b) Class code
(c) Method code
(d) Byte-code
Answer: D

4) The hardest kind of error to detect in a computer program is a:
(a) Syntax error
(b) Run-time error
(c) Logic error
(d) All of the above
Answer: C


Copyright © 2016 Pearson Education, Inc., Hoboken NJ




NURSINGBYTES

, N
Chapter 1 Getting Started 2




U
R
5) Identify the invalid Java identifier.




SI
(a) 1Week
(b) Week1




N
(c) amountDue




G
(d) amount_due
Answer: A




BY
6) What is the value of the variable amountDue?




TE
double price = 2.50;

double quantity = 5;




S
double amountDue = 0;

amountDue = price * quantity;

(a) 12
(b) 12.25
(c) 12.5
(d) 13
Answer: C

7) What is the value of 7.52e-5?
(a) 752000.0
(b) 0.0000752
(c) 0.000752
(d) 0.00752
Answer: B

8) What is the Java expression for 4a 2 + 2b * c?
(a) (4 * a) + (2 * b) * c
(b) (4 * a * a) + ((2 * b) * c)
(c) ((4 * a * a) + (2 * b)) * c
(d) (4 + a * a) + ((2 + b) * c)
Answer: B

9) What is the Java expression for 27xy?
(a) 27 + (x * y)
(b) 27 * (x + y)
(c) 27 * x * y
(d) 27x * y
Answer: C
Copyright © 2016 Pearson Education, Inc., Hoboken NJ




NURSINGBYTES

, N
Chapter 1 Getting Started 3




U
R
10) The value of the expression (int) 27.6 evaluates to:




SI
(a) 28
(b) 27




N
(c) 26




G
(d) None of the above.
Answer: B




BY
11) Which operator is used to concatenate two strings?
(a) +




TE
(b) –
(c) *




S
(d) /
Answer: A

12) Which operator returns the remainder of integer division?
(a) %
(b) /
(c) *
(d) none of the above
Answer: A

13) What is the value of the variable c in the statements that follow?

String phrase = "Make hay while the sun is shining.";

char c = phrase.charAt(10);
(a) w
(b) h
(c) i
(d) None of the above
Answer: B

14) The escape sequence the represents the new-line character is:
(a) \r
(b) \t
(c) \n
(d) \\
Answer: C




Copyright © 2016 Pearson Education, Inc., Hoboken NJ




NURSINGBYTES

, N
Chapter 1 Getting Started 4




U
R
15) The syntax that declares a Java named constant named SALES_TAX is:




SI
(a) double SALES_TAX = 7.50;
(b) public double SALES_TAX = 7.50;




N
(c) public static double SALES_TAX = 7.50;




G
(d) public static final double SALES_TAX = 7.50;
Answer: D




BY
16) In Java, a block comment is delimited by:
(a) */ /*




TE
(b) /* /*
(c) /* */




S
(d) */ */
Answer: C

17) To mark a block comment for inclusion in the Javadoc documentation, the block must be delimited
by:
(a) /** */
(b) */* */
(c) **/ /*
(d) **/ */
Answer: A



◼ True/False
1) Java began as a language for home appliances.
Answer: True

2) Applets were designed to run as stand-alone applications.
Answer: False

3) The Java programming language allows you to concatenate two strings using the plus sign.
Answer: True

4) Java is an interpreted language.
Answer: True

5) Java does not require that a variable be declared before it is used within a program.
Answer: False

6) A variable of type boolean can be explicitly converted to that of type int.
Answer: False
Copyright © 2016 Pearson Education, Inc., Hoboken NJ




NURSINGBYTES

Connected book
 image
Walter Savitch, Kenrick Mock Absolute Java
Publisher: 2015 ISBN: 9780134041674 Edition: Unknown

Document information

Uploaded on
April 2, 2025
Number of pages
222
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
R297,13

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Nursingbytes
4,0
(6)
Sold
43
Followers
0
Items
522
Last sold
1 week ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions