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 20 páginas
Examen

CSCI 1301 final exam study guide Questions Exam With Complete Solutions

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

CSCI 1301 final exam study guide Questions Exam With Complete Solutions Graded A+

Vista previa del contenido

CSCI 1301 final exam study guide Questions Exam
With Complete Solutions
Graded A+

QUESTIONS AND ANSWERS

Which of the following declares a variable that will store a measurement with fractional
parts?


A) int measure;
B) double measure;
C) String measure;
D) integer measure; ANSWER -B) double measure;


Assuming that the user inputs "Joe" at the prompt, what is the output of the following code
snippet?


A) The code snippet does not compile because the += operator cannot be used in this
context
B) Joe, Good morning
C) , Good morning
D) Joe ANSWER -B) Joe, Good morning


The assignment operator


A) denotes mathematical equality
B) places a new value into a variable
C) means the same as the equal sign used in algebra
D) makes it illegal to write a statement like "sum = sum + 4" ANSWER -B) places a new
value into a variable


What term is used to refer a to a sequence of characters enclosed in quotation marks?

,A) string
B) object
C) comment
D) variable ANSWER -A) string


What is the result of the following statement
String s = "You" + "had" + "me" + "at" + "hello";


A) The string s has the following value: "You had me at hello"
B) The statement results in an error because the + operator can be only used with numbers
C) The statement results in an error because the + operator cannot be performed on string
literals
D) The string s has the following value: "Youhadmeathello" ANSWER -D) The string s
has the following value: "Youhadmeathello"


A method may be called by specifying which 3 items in the specified order? ANSWER -
Object, method name, parameters


When a Java application starts, what is the name of the method that is executed?


A) main
B) start
C) begin
D) Main ANSWER -A) main


What will be printed by the statement below
int x = 20;
int y = x;
x += 3;
y *= 2;
System.out.print("x = " + x + ", y = " + y);

, A) x = 23, y = 46
B) x = 23, y = 40
C) x = 46, y = 46
D) x = 3, y = 2 ANSWER -B) x = 23, y = 40


Assuming the following Java statement


Circle cl = new Circle (3);


What does the variable c1 store?


A) The constructed object itself
B) A reference to the circle class
C) A reference to the memory location of the constructed object
D) The numeric value 3 ANSWER -C) A reference to the memory location of the
constructed object


Assume a, b, and c have been defined to be integer variable. Which of the following value
makes the expression below true?


! (a == b) && (c > a)


A) a = 10, b = 10, c = 15
B) a = 10, b = 20, c = 15
C) a = 10, b = 2, c = 5
D) a = 10, b = 20, c = 10 ANSWER -B) a = 10, b = 20, c = 15


Parameters and local variables belongs to ________________ ANSWER -Methods


Instances variables belong to ________________ ANSWER -Objects


static variable belong to ________________ ANSWER -Classes

Información del documento

Subido en
5 de enero de 2026
Número de páginas
20
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$11.99

¿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

Vendido
8
Seguidores
0
Artículos
1069
Última venta
1 mes 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