100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

CPS 1231 Chapter 3-4.2 Exam Study Guide Review Questions with complete solution 2025

Rating
-
Sold
-
Pages
27
Grade
A+
Uploaded on
13-08-2025
Written in
2025/2026

CPS 1231 Chapter 3-4.2 Exam Study Guide Review Questions with complete solution 2025

Institution
CPS 1231 Chapter 3-4.2
Course
CPS 1231 Chapter 3-4.2










Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
CPS 1231 Chapter 3-4.2
Course
CPS 1231 Chapter 3-4.2

Document information

Uploaded on
August 13, 2025
Number of pages
27
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

CPS 1231 Chapter 3-4.2 Exam Study Guide Review Questions
with complete solution 2025

1. 2. The equal comparison operator in Java is area of a
circle if the
. radius is
positive.
a. <>
b. !=
c. ==
d. ^=

2. 1. The "less than or equal to" comparison
operator in Java is .

a. <
b. <=
c. =<
d. <<
e. !=

3. 3. What is 1 + 1 + 1 + 1 + 1 == 5?

a. true
b. false
c. There is no guarantee that 1 + 1 + 1 + 1 +
1 == 5 is true.

4. 5. In Java, the word true is .

a. a Java keyword
b. a Boolean literal
c. same as value 1
d. same as value 0

5. 6. Which of the following code displays the
1/
27

,CPS 1231 Chapter 3-4.2 Exam Study Guide Review Questions
with complete solution 2025
c
Note that there is no space separating the dou- ble equal signs.



b
It reads less than or equal to. So write the less than symbol before the
equal sign. Note that there is no space separating the two symbols.


a
These are all integers. In- teger arithmetic is accu- rate.



b
true is a Boolean literal just like integer literal 10.




c
Positive means > 0.




2/
27

, CPS 1231 Chapter 3-4.2 Exam Study Guide Review Questions
with complete solution 2025

a. if (radius != 0) System.out.println(radius * { System.
radius * 3.14159); out.println
b. if (radius >= 0) System.out.println(radius * ("Income
radius * 3.14159); is greater
c. if (radius > 0) System.out.println(radius * than
radius * 3.14159); 4000");
d. if (radius <= 0) System.out.println(radius * }
radius * 3.14159);

6. 7. What is the output of the following
code? int x = 0;
if (x <
4) { x
=x+
1;
}
System.out.println("x is " + x);

a. x is 0
b. x is 1
c. x is 2
d. x is 3
e. x is 4

7. Section 3.4 Two-Way if-else Statements
8. Suppose income is 4001, what is the output
of the following code?
if (income > 3000) {
System.out.println("Income is greater than
3000");
}
else if (income > 4000)
3/
27

Get to know the seller

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.
LEWISSHAWN55 Yale University
View profile
Follow You need to be logged in order to follow users or courses
Sold
87
Member since
2 year
Number of followers
46
Documents
7223
Last sold
1 week ago
THE SHOP FOR EXAMS,TESTBANKS,AQA, WHAT YOU STUDY AND WISH TO PASS THEN COME AND CHECK FOR YOUR NEED ......

WANT TO PASS YOUR EXAMS??? IF YES CHECK OUT MY ACCOUNT FOR ALL YOUR EXAMS NEED BE IT NURSING,REALTORS, HUMAN RESOURCE,MATHS,BIOLOGY,WGU,ICT, YOU BETTER CHECK MY ACCOUNT FOR MORE IF YOU GET WHAT U WANT THEN FEEL FREE TO PURCHASE AT A BETTER PRICE........

3.1

10 reviews

5
5
4
0
3
0
2
1
1
4

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

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

Student with book image

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

Alisha Student

Frequently asked questions