CSE 2221 Final Exam Review| Study Questions Solved 100% Correc
or a method formal parameter p, which parameter mode guarantees that #p cannot appear n the ensures clause for the method's contract? a. clears b. replaces c. restores d. updates - ANSWER B. replaces You may reason about the behavior of Java code involving immutable types exactly as if they were primitive types because: a. "Immutable" and "primitive" are synonyms; there is no difference between them b. Computations involving immutable types are just as efficient as those involving primitive types c. Aliasing, which can happen with immutable types but not primitive types, cannot cause trouble because object values for immutable types cannot be changed d. In any code where an immutable type is used in a way where it would not behave like a primitive type, it causes a Java compile-time error - ANSWER C. Aliasing
Escuela, estudio y materia
- Institución
- CSE 2221
- Grado
- CSE 2221
Información del documento
- Subido en
- 25 de mayo de 2024
- Número de páginas
- 25
- Escrito en
- 2023/2024
- Tipo
- Examen
- Contiene
- Preguntas y respuestas
Documento también disponible en un lote