Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Document preview thumbnail
Vista previa 3 fuera de 27 páginas
Examen

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

Document preview thumbnail
Vista previa 3 fuera de 27 páginas

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

Vista previa del contenido

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

Información del documento

Subido en
13 de agosto de 2025
Número de páginas
27
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$17.49

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
LEWISSHAWN55
2.9
(11)
Vendido
96
Seguidores
46
Artículos
7346
Última venta
6 días hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes