• HOME
  • SHOP
  • HOME
  • SHOP
Login / Register
testbanks testbank logo 1 1
  • English
    • Deutsch
    • French
    • Requires WPML plugin
  • Country
    • United States (USD)
    • Deutschland (EUR)
    • Japan (JPY)
Wishlist
0 items / $0.00
Menu
testbanks testbank logo 1 1
0 items / $0.00
  • Life & Science
    • Biology Test Bank
    • Essentials Test Bank
    • Communication Test Bank
    • Anatomy & Physiology test bank
    • Sociology Test Bank
    • Social work test bank
    • Primary care test bank
    • Organic Chemistry
  • BUSINESS & MANAGEMENT
    • Accounting Test Bank
    • Emergency care test bank
    • Management Test Bank
    • Calculate & Confidence
    • Taxation of business
    • Investment
  • Test Bank
  • HEALTH PROFESSIONS
    • Nursing Test Bank
    • Radiologic Test Bank
    • Radiography Test bank
    • Pharmacology/Surgical test bank
    • Nutritional Care test bank
    • Health Test Bank
    • Drug Test Bank
JAVA FOUNDATIONS 3E JOHN LEWIS, PETER DEPASQUALE
Click to enlarge
Home Test Bank JAVA FOUNDATIONS 3rd Ed By JOHN LEWIS – Test Bank
Test bank For Jansons Basic History of Western Art 9th Edition by Penelope J.E. Davies
Jansons Basic History of Western Art 9th Edition - Test Bank $20.00
Back to products
Journey Across the Life Span Human Development And Health Promotion 5th Edition By Polan, Elaine U Test Bank
Journey Across the Life Span Human Development And Health Promotion 5th Edition - Test Bank $19.00

JAVA FOUNDATIONS 3rd Ed By JOHN LEWIS – Test Bank

$32.00

Edition: 3rd Edition

Format: Downloadable ZIP File

Resource Type: Test Bank

Duration: Unlimited downloads

Delivery: Instant Download

Compare
Add to wishlist
Category: Test Bank
Share:
  • Description
  • Reviews (0)
  • Shipping & Delivery
Description

JAVA FOUNDATIONS 3rd Ed By JOHN LEWIS – Test Bank

Chapter 3: Using Classes and Objects

Multiple Choice Questions:

1)  The ________________ operator is used to instantiate an object.

a)  static

b)  new

c)  +

d)  – 

e)  none of the above

Answer: b

Explanation:  The new operator instantiates an object.  There is no static operator, and the + and – operators are for arithmetic expressions (although the + operator can also be used for String concatenation).

2)  A special method that is invoked to set up an object during instantiation is called a ___________________.

a) new method

b) dot operator 

c) creator

d) constructor

e) destructor

Answer: d

Explanation:  The constructor is called to set up an object during instantiation.  The dot operator is used to access methods of an object.  There is no “new” method – new is an operator.  Java also does not have “creators” or “destructors.”

3)  Which of the following is an invalid way to instantiate a String object?

a) String title = new String(“Java Software Solutions”);

b) String name = “John Lewis”;

c) String empty = “”;

d) String alsoEmpty = new String(“”);

e) all of the above are valid

Answer: e

Explanation:  Choices a and d represent the standard approach to instantiating a String object.  Choice d creates the empty string.  Choices b and c use a shortcut notation that is only available for creating a String object.

4)  Assume that we have a Random object referenced by a variable called a generator.  Which of the following lines will generate a random number in the range 5-20 and store it in the int variable random?

a)  randNum = generator.nextInt(15) + 5;

b)  randNum = generator.nextInt(15) + 6;

c)  randNum = generator.nextInt(16) + 5;

d)  randNum = generator.nextInt(16) + 6;

e) none of the above

Answer: c

Explanation:  When called with 16 as a parameter, the nextInt() method will return a number in the range 0 to 15.  Adding 5 to this random number will generate a number in the range 5 to 20.

5)  Which of the following classes includes the getCurrencyInstance() method?

a)  String

b)  NumberFormat

c)  DecimalFormat

d)  Math

e)  none of the above

Answer: b

Explanation:  The NumberFormat class includes the getCurrencyInstance() method.

6)  Which of the following expressions correctly computes 5 + 26?

a) result = 5 + 2^6;

b) result = 5 + 2*exponent(6);

c) result = 5 + 2*Math.exponent(6);

d) result = 5 + Math.pow(2, 6);

e) none of the above

Answer: d

Explanation:  Choice a is wrong because Java does not have an exponential operator for primitive types.  Choices b and C are wrong because there are no methods named exponent in the java.lang package or the Math class.  Choice c correctly uses the Math. pow method to compute the expression.

7)  Consider the following snippet of code:

Random generator = new Random();

int randNum = generator.nextInt(20) + 1;

Which of the following will be true after these lines are executed?

a) random will hold a number between 1 and 20 inclusive.

b) random will hold a number between 0 and 20 inclusive.

c) random will hold a number between 1 and 21 inclusive.

d)  these lines will not be executed because a compiler error will result. 

e)  none of the above

Answer: a

Explanation: When called with a parameter of 20, the next () method will return an integer between 0 and 19 inclusive.  Adding one to this will result in a number between 1 and 20 inclusive.

Related

Reviews (0)

Reviews

There are no reviews yet.

Be the first to review “JAVA FOUNDATIONS 3rd Ed By JOHN LEWIS – Test Bank” Cancel reply

Your email address will not be published. Required fields are marked *

Shipping & Delivery
wd ship 1
wd ship 2

MAECENAS IACULIS

Vestibulum curae torquent diam diam commodo parturient penatibus nunc dui adipiscing convallis bulum parturient suspendisse parturient a.Parturient in parturient scelerisque nibh lectus quam a natoque adipiscing a vestibulum hendrerit et pharetra fames nunc natoque dui.

ADIPISCING CONVALLIS BULUM

  • Vestibulum penatibus nunc dui adipiscing convallis bulum parturient suspendisse.
  • Abitur parturient praesent lectus quam a natoque adipiscing a vestibulum hendre.
  • Diam parturient dictumst parturient scelerisque nibh lectus.

Scelerisque adipiscing bibendum sem vestibulum et in a a a purus lectus faucibus lobortis tincidunt purus lectus nisl class eros.Condimentum a et ullamcorper dictumst mus et tristique elementum nam inceptos hac parturient scelerisque vestibulum amet elit ut volutpat.

Related products

Test Bank for Applied Pathophysiology A Conceptual Approach to the Mechanisms of Disease 3rd Edition
Compare
Quick view
Add to wishlist

Test Bank for Applied Pathophysiology A Conceptual Approach to the Mechanisms of Disease 3rd Edition

$30.00
Add to cart
Test Bank For Physical Examination and Health Assessment Canadian 2nd Edition by Jarvis
Compare
Quick view
Add to wishlist

Test Bank For Physical Examination and Health Assessment Canadian 2nd Edition by Jarvis

$25.00
Add to cart
Test Bank For Interpersonal Relationships 8th Edition by Arnold
Compare
Quick view
Add to wishlist

Test Bank For Interpersonal Relationships 8th Edition by Arnold

$25.00
Add to cart
Test Bank For Human Anatomy 6th Edition by Saladin
Compare
Quick view
Add to wishlist

Test Bank For Human Anatomy 6th Edition by Saladin

$30.00
Add to cart
Test Bank For Introductory Mental Health Nursing 4th Edition by Womble
Compare
Quick view
Add to wishlist

Test Bank For Introductory Mental Health Nursing 4th Edition by Womble

$25.00
Add to cart
Test Bank for Basic and Applied Concepts of Blood Banking and Transfusion Practices 4th Edition by Howard
Compare
Quick view
Add to wishlist

Test Bank for Basic and Applied Concepts of Blood Banking and Transfusion Practices 4th Edition by Howard

$20.00
Add to cart
Test Bank For Professional Nursing 9th Edition by Black
Compare
Quick view
Add to wishlist

Test Bank For Professional Nursing 9th Edition by Black

$30.00
Add to cart
Test Bank For Sociology in Modules 5th Edition by Schaefer
Compare
Quick view
Add to wishlist

Test Bank For Sociology in Modules 5th Edition by Schaefer

$25.00
Add to cart
You must select your brand attribute in Theme Settings -> Shop -> Brands

testbanks
  • wd cursor dark 100 E San Fernando St, San Jose, CA 95112, United States
  • wd phone dark Whatsapp: +1-6269466008
  • wd envelope dark Email: support@testbanks.ltd

Products
  • Business Law in Canada, 13th edition Test Bank For Business Law in Canada 13th Edition Richard A. Yates $50.00 Original price was: $50.00.$40.00Current price is: $40.00.
  • Test Bank for Human Resource Management 16th Edition Test Bank for Human Resource Management 16th Edition $40.00 Original price was: $40.00.$30.00Current price is: $30.00.
Our stores
  • Test Bank
  • Shop
  • GUIDE
  • FAQs
  • Wishlist
  • Portfolio
Exam,s
  • ATI Exams
  • Hesi Exams
Footer Menu
  • About us
  • Contact us
  • Privacy Policy
  • Term & Conditions
  • Billing Terms & Conditions

© 2025 testbanksltd. All rights reserved

payments
  • Menu
  • Categories
  • ATI Exams
  • Hesi Exams
  • Life & Science
    • Biology Test Bank
    • Essentials Test Bank
    • Communication Test Bank
    • Anatomy & Physiology test bank
    • Sociology Test Bank
    • Social work test bank
    • Primary care test bank
    • Organic Chemistry
  • BUSINESS & MANAGEMENT
    • Accounting Test Bank
    • Emergency care test bank
    • Management Test Bank
    • Calculate & Confidence
    • Taxation of business
    • Investment
  • Test Bank
  • HEALTH PROFESSIONS
    • Nursing Test Bank
    • Radiologic Test Bank
    • Radiography Test bank
    • Pharmacology/Surgical test bank
    • Nutritional Care test bank
    • Health Test Bank
    • Drug Test Bank
  • Wishlist
  • Compare
  • Login / Register
Shopping cart
close

Sign in

close

Lost your password?

No account yet?

Create an Account
Start typing to see products you are looking for.
Shop
Wishlist
0 items Cart
My account
1
WhatsApp
Hello 👋
Can we help you?
Live chat