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
Geschreven voor
- Instelling
- CSE 2221
- Vak
- CSE 2221
Documentinformatie
- Geüpload op
- 25 mei 2024
- Aantal pagina's
- 25
- Geschreven in
- 2023/2024
- Type
- Tentamen (uitwerkingen)
- Bevat
- Vragen en antwoorden
Onderwerpen
-
cse 2221 final exam
-
review study questions
Ook beschikbaar in voordeelbundel