Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part l: Multiple Choice Questions: (3 pts each) 1. To subtract a from b and store result in a, you write a b-a c. b-A-b;

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Part l: Multiple Choice Questions: (3 pts each) 1. To subtract a from b and store result in a, you write a b-a c. b-A-b; 2. To declare a constant SCALE, you write a. final static SCALE 3.05 b final float SCALE 3.05; c. static double SCALE-3.05 d. final double SCALE 3.05; 3. To assign a float variable d to an int variable x, you write a. -(long)d x=(int)d; c. Xd d. x-(float)d; 4. Which of the following is a constant, according to Java naming conventions? a. P b. .read d. ReadInt Test 5. Which of the following assignment statements is illegal? a. double f--3.14; b. int t-31 c. float f- 3.14; d. short s 31; 6. An int variable can hold a. "A" b. 65 c. A e. b and c 7. Which of the following is the correct expression of character x? a. b. "x" c. 000x' d. None of the above. 8. Which of the following assignment statements is correct to assign character 9 to c? char c =9; h charc-9 a

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Driven Web Sites

Authors: Mike Morrison, Joline Morrison

1st Edition

061901556X, 978-0619015565

More Books

Students also viewed these Databases questions