• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 18 páginas
Examen

INSY 4305 Final UPDATED ACTUAL Exam Questions and CORRECT Answers

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

INSY 4305 Final UPDATED ACTUAL Exam Questions and CORRECT Answers 1. Streams that input bytes from and output bytes to files are known as ________. a. bit-based streams b. byte-based streams c. character-based streams d. Unicode-based streams - CORRECT ANSWER 2. Which of the following statements is false? a. A Path represents the location of a file or directory. - b. byte-based stream

Vista previa del contenido

INSY 4305 Final UPDATED ACTUAL
Exam Questions and CORRECT Answers
1. Streams that input bytes from and output bytes to files are known as ________.
a. bit-based streams
b. byte-based streams
c. character-based streams

d. Unicode-based streams - CORRECT ANSWER - b. byte-based streams


2. Which of the following statements is false?
a. A Path represents the location of a file or directory.
b. Path objects open files and provide file-processing capabilities.
c. Class Paths is used to get a Path object representing a file or directory location.
d. The static method get of class Paths converts a String representing a file's or directory's
location into a Path object - CORRECT ANSWER - b. Path objects open files and provide
file-processing capabilities.


3. A(n) ________ path starts from the directory in which the application began executing.
a. absolute
b. relative
c. parallel

d. comparative - CORRECT ANSWER - b. relative


4. Path method ________ returns the String name of a file or directory without any location
information.
a. getStringName
b. getFileOrDirectoryName
c. getDirectoryName

d. getFileName - CORRECT ANSWER - d. getFileName

,5. Files static method ________ receives a Path and returns a boolean indicating whether that
Path represents a directory on disk.
a. isDiskDirectory
b. isDirectory
c. isFileDirectory

d. isPath - CORRECT ANSWER - b. isDirectory


6. What does the following statement do?

Scanner scanner = new Scanner(Paths.get("test.txt")); - CORRECT ANSWER - c. Opens a
text file for input.


7. String objects are immutable. This means they ________. - CORRECT ANSWER - c.
cannot be changed


8. The length of a string can be determined by ________.
a. the String method length()
b. the String instance variable length
c. the String method strlen()

d. All of the above. - CORRECT ANSWER - a. the String method length()


9. The statement
s1.equalsIgnoreCase(s4)
is equivalent to which of the following?
a. s1.regionMatches(true, 0, s4, 0, s4.length());
b. s1.regionMatches(0, s4, 0, s4.length());
c. s1.regionMatches(0, s4, 0, s4.length);

d. s1.regionMatches(true, s4, 0, s4.length); - CORRECT ANSWER - a.
s1.regionMatches(true, 0, s4, 0, s4.length());

, 10. The statement
s1.startsWith("art")
has the same result as which of the following?
a. s1.regionMatches(0, "art", 0, 3);
b. s2 = s1.getChars(0, 3);
s2.equals("art");
c. s1.regionMatches(true, 0, "art", 0, 3);

d. All of the above - CORRECT ANSWER - d. All of the above


11. For
String c = "hello world";
The Java statements
int i = c.indexOf('o');
int j = c.lastIndexOf('l');

will result in: - CORRECT ANSWER - c. i = 4 and j = 9.


12. Given the following declaration:
StringBuilder buf = new StringBuilder();
What is the capacity of buf?
a. 0
b. 10
c. 16

d. 20 - CORRECT ANSWER - c. 16


13. Given the following declarations:
StringBuilder buffer = new StringBuilder("Testing Testing");
buffer.setLength(7);

Información del documento

Subido en
6 de septiembre de 2025
Número de páginas
18
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$12.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.
STANFORDGRADESS
4.0
(239)
Vendido
1606
Seguidores
108
Artículos
115164
Última venta
2 horas 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