100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
Test Bank - Absolute Java 6th Edition(Savitch, 2015) $19.99   Add to cart

Exam (elaborations)

Test Bank - Absolute Java 6th Edition(Savitch, 2015)

 9 views  0 purchase
  • Course
  • Absolute Java 6th Edition By Walter Savitch
  • Institution
  • Absolute Java 6th Edition By Walter Savitch

Table of Contents Chapter 1: GETTING STARTED Chapter 2: CONSOLE INPUT AND OUTPUT Chapter 3: FLOW OF CONTROL Chapter 4: DEFINING CLASSES I Chapter 5: DEFINING CLASSES II Chapter 6: ARRAYS Chapter 7: INHERITANCE Chapter 8 POLYMORPHISM AND ABSTRACT CLASSES Chapter 9: EXCEPTION...

[Show more]

Preview 4 out of 223  pages

  • August 3, 2024
  • 223
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
book image

Book Title:

Author(s):

  • Edition:
  • ISBN:
  • Edition:
  • Absolute Java 6th Edition By Walter Savitch
  • Absolute Java 6th Edition By Walter Savitch
avatar-seller
MedGeek
M
E D
G
EE K

, Chapter 1 Getting Started 1




Chapter 1
Getting Started




M
◼ Multiple Choice
1) Java is an object-oriented programming language. An object-oriented language




E
(a) Uses structured programming.
(b) Views a program as consisting of objects which communicate through interactions.

(d) All of the above.
Answer: B
D
(c) Functionally breaks down problems into smaller, more manageable problems.
G
2) In Java, the equal sign is used as the ___________ operator.
(a) increment
E

(b) decrement
(c) assignment
(d) negation
E


Answer: C
K


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

, Chapter 1 Getting Started 2


5) Identify the invalid Java identifier.
(a) 1Week
(b) Week1
(c) amountDue
(d) amount_due
Answer: A

6) What is the value of the variable amountDue?

double price = 2.50;




M
double quantity = 5;

double amountDue = 0;




E
amountDue = price * quantity;

(a) 12
(b)
(c)
12.25
12.5
D
G
(d) 13
Answer: C
E
7) What is the value of 7.52e-5?
(a) 752000.0
(b) 0.0000752
E

(c) 0.000752
(d) 0.00752
K


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

, Chapter 1 Getting Started 3


10) The value of the expression (int) 27.6 evaluates to:
(a) 28
(b) 27
(c) 26
(d) None of the above.
Answer: B

11) Which operator is used to concatenate two strings?
(a) +
(b) –
(c) *




M
(d) /
Answer: A




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

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

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

char c = phrase.charAt(10);
(a) w
(b) h
K


(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

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller MedGeek. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $19.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

73243 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$19.99
  • (0)
  Add to cart