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

ITSC 1213 CORE MAIN QUESTIONS AND ANSWERS SET A.pdf

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

ITSC 1213 CORE MAIN QUESTIONS AND ANSWERS SET A.pdf

Vista previa del contenido

ITSC 1213 CORE MAIN QUESTIONS AND ANSWERS
SET A+
✔✔What will be printed?

int j = 0;
int sum = 0;
for (int i = 0; j < 10; j++) {
sum++;
}
System.out.println(sum); - ✔✔10

✔✔How many times will this loop execute?

for (int x = 5; x >=0; x--) {
...
} - ✔✔6

✔✔Which of the following are characteristics of ArrayLists (select all that apply)? -
✔✔Parameterized types

✔✔Declaring an ArrayList is accomplished by which of the following? -
✔✔ArrayList<String> myList = new ArrayList<String>();

✔✔The number of elements in an ArrayList named myList is found by -
✔✔myList.size();

✔✔Given the following code, how would you add the first element to the ArrayList?

ArrayList<Foo> myList = new ArrayList<Foo>();
Foo f = new Foo(); - ✔✔myList.add(f);

, ✔✔Given an ArrayList of type Bar and of unknown size, how would you remove the
element created by the following statement?

Bar b = new Bar(); - ✔✔if(myList.contains(b)) myList.remove(b);
OR
myList.remove(b);

✔✔Except for classes in the java.lang package, you always have to specify the full
name of every class you want to use in your code. - ✔✔True

✔✔The full name of a class is given by - ✔✔<package_name>.<class_name>

✔✔Which of the following are valid uses of package names? - ✔✔public
java.util.ArrayList<String> s fred() { ...}
OR
import java.util.ArrayList; public class myClass { ... ArrayList<String> s = new
ArrayList<String>; ... }

✔✔ A java class is - ✔✔a blueprint for creating objects

✔✔In object-oriented programming we - ✔✔model real-world "things" or projects in
code

✔✔Javac is a - ✔✔complier

✔✔The hierarchy of code elements in Java is - ✔✔Source -> Class -> Method ->
Statement

✔✔Considering how parameters are used in methods, Java passes everything by -
✔✔argument

✔✔The maximum number of values a method is allowed to return is - ✔✔one and only
one

✔✔The Java equivalent of cout is - ✔✔System.out.println(...);

✔✔In Java, a class - ✔✔defined the operations an object can perform and the
information that object "knows"

✔✔In Java, everything goes in a class - ✔✔True

✔✔In a Java class, the name of a method that can be executed is - ✔✔main

Información del documento

Subido en
6 de agosto de 2026
Número de páginas
5
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$18.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
1
Seguidores
2
Artículos
4807
Ú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