100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4,6 TrustPilot
logo-home
Examen

CMSC131 Review UMD with all Correct & 100% Verified Answers |Actual Complete Exam| Already Graded A+

Puntuación
-
Vendido
-
Páginas
13
Grado
A+
Subido en
17-12-2025
Escrito en
2025/2026

CMSC131 Review UMD with all Correct & 100% Verified Answers |Actual Complete Exam| Already Graded A+

Institución
Grado

Vista previa del contenido

CMSC131 Review UMD with all Correct & 100% Verified
Answers |Actual Complete Exam| Already Graded A+

Why are there 8 different numeric types in java? ✔Correct Answer--Because java is a restrictive
language: it requires that the bit count is noted and known. Different types have different bit counts,
so it shows the size.

How would you write an int and float constants? ✔Correct Answer--int i= number;
float f= number;

How would declare a variable with initialization versus without? ✔Correct Answer--with:
int i= 2;

without:
int i;

What is the order of precedence? ✔Correct Answer--1. parentheses/brackets
2. cast/new objects
3. multiplication/division
4. addition/subtraction
5. relational (instanceof)
6. equality
7. and (&&)
8. or (||)
9. assignment

How would you print "Hello World" onto one line? ✔Correct Answer--System.out.print("Hello ");
System.out.print("World");

How would you print "Hello World" onto 2 separate lines? ✔Correct Answer--
System.out.println("Hello");
System.out.println("World");

What is the difference between system.out.println(); and system.out.print(); ✔Correct Answer--
println prints the messages on different lines while print prints the messages on the same line

How can you convert an int to a char? ✔Correct Answer--Declaration
1. set the char to a variable
2. set an int variable to that char variable

NumericValue
1. create an int variable that is the Character.getNumericValue(charVariable);

String Value of
1. Create an int variable
2. assign it to Integer.parseint(String.valueOf(c));

How do you cast a float to an int? ✔Correct Answer--Math.round
1. use Math.round();

, Type Casting
1. int value= (int) 3.10f//

How do convert an int to a char? ✔Correct Answer--Type Casting
int a=65;
char c=(char)a;

Character.forDigit()
int a=1;
char c= Character.forDigit(a);

What is a widening type conversion? ✔Correct Answer--When you are casting a type object to a
greater primitive data type:

-byte to short, int, long, float, or double

-short to int, long, float, or double

-char to int, long, float, or double

-int to long, float, or double

-long to float or double

-float to double

What is a narrowing type conversion? ✔Correct Answer--When you are going from a larger
primitive data type to a smaller, meaning you must cast the type/round it.

How would you declare a char variable equal to a? ✔Correct Answer--char ch= 'a'; //needs single
quotes

How would you generate a random number? ✔Correct Answer--Math.random(); //returns double
between 0.0 and 1.0

Random class:
Random rand= new Random ();
int r= rand.nextInt(100); //number 1 to 99

What is the ASCII value for 'a' through 'z'? ✔Correct Answer--97-122

What is the ASCII value for 'A' through 'Z'? ✔Correct Answer--65-90

What is the ASCII value for '0' to '9'? ✔Correct Answer--48-57

How would you convert a string to an integer? ✔Correct Answer--Integer.parseInt(string);

How would you convert a specified int to a string? ✔Correct Answer--static String s.toString(int);

How would you return the value of a character object? ✔Correct Answer--Character.charValue();

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
17 de diciembre de 2025
Número de páginas
13
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$18.99
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor

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.
Studyclub Yale School Of Medicine
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
27
Miembro desde
1 año
Número de seguidores
0
Documentos
8994
Última venta
2 días hace
"The Club for Top Academic Performance."

Welcome to StudyClub—the ultimate destination for students who want to make studying not only effective but also enjoyable! Whether you’re preparing for an exam, looking to improve your grades, or mastering new subjects, StudyClub is your go-to space to find the tools and resources you need to succeed. At StudyClub, I believe in the power of community. That’s why I’ve created a collection of high-quality study materials designed to simplify complex concepts and help you achieve your academic goals. Whether you’re an individual looking to study independently or a student seeking the support of a virtual study group, you’ll find everything you need to succeed. Join the StudyClub today, where learning is made easier, more organized, and—most importantly—more collaborative. Let’s grow together, learn smarter, and unlock your academic potential. Thank you for being part of the StudyClub community. I can’t wait to see you succeed!

Lee mas Leer menos
3.6

7 reseñas

5
4
4
0
3
1
2
0
1
2

Recientemente visto por ti

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