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 2 fuera de 7 páginas
Examen

CMSC131 FINAL EXAM PREP QUESTIONS WITH VERIFIED ANSWERS

Document preview thumbnail
Vista previa 2 fuera de 7 páginas

CMSC131 FINAL EXAM PREP QUESTIONS WITH VERIFIED ANSWERS

Vista previa del contenido

CMSC131 FINAL EXAM PREP QUESTIONS WITH
VERIFIED ANSWERS

The following declaration is possible:
public class Foo extends A implements B, C {
...
} - Answers - true

Where is a "current object" present? - Answers - Constructors and Instance methods

If you were taking an introductory programming course in the 1980's, which of these
languages is most likely to have been taught? - Answers - Pascal

Which of the following are considered "secondary memory devices." - Answers - USB
flash drive and hard drive

How many different values can be represented by 4 bits? - Answers - 16 (2^4)

What term describes the situation where two different variables refer to the same
object? - Answers - aliasing

How is your Java source code translated into machine code? - Answers - First a
compiler then an interpreter

What kinds of variables are stored on the call stack? - Answers - Local variables and
parameters

The following code fragment will compile:
int y = 5;
if(y < 10) {
int x = 17;
}
System.out.println(x); - Answers - False

What term describes 2^20 bytes of space? - Answers - megabyte

What kind of variables are used to represent the "state" of objects? - Answers - instance
variables

What advantages does primary memory have over secondary memory? - Answers -
Faster

Which of the following is the best definition for the term "byte"? - Answers - A sequence
of 8 bits

, What is the output of the following code fragment?
for(int x = 7; x < 11; x= x*2){
x-=3;
System.out.print(x)
} - Answers - 457

Which of the following will compile?
A. byte a = 17;
B. double c = 15F;
C. String e = 'x';
D. int b = 15L;
E. byte d = 130; - Answers - A, B

List the following operators in order of precedence (highest to lowest)
|| < += && == - Answers - < == && || +=

Write the binary representation of the number 50 - Answers - 110010

How many Dog objects are created by following code fragment?
Dog a = new Dog ("Spot"), c = new Dog("Alfie");
Dog b;
Dog d = a;
Dog f = new Dog(a); - Answers - 3

After the following code has been executed, how many objects have become garbage?
Dog a = new Dog( );
Dog b = new Dog( );
b = a;
a = new Dog( );
a = new Dog( ); - Answers - 2

After the following code has been executed, what is the value of the variable y?
int x =5, y = 10;
if(x++ == 5 || --y > 50){
y+=4;
} - Answers - 14

Assume that the following code has been executed.
String a = new String("bozo");
String b = a;
String c = new String(b);
Which of the following boolean expressions will evaluate as true?
a ==b
a.equals(c)
b==c - Answers - a==b

Información del documento

Subido en
10 de julio de 2026
Número de páginas
7
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$13.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

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.
GEEKA
3.8
(361)
Vendido
2137
Seguidores
1449
Artículos
58516
Última venta
2 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