1/16
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
When an object is passed as an argument to a method, this is actually passed.
a) A copy of the object b) The name of the object c) A reference to the object d) None of these; you cannot pass an object
c
If a method has a parameter that is a reference variable, you should make sure the parameter is not equal to__________ before using it in an operation.
a) false
b) 0
c) null
d) Nan
c
If you write this method for a class, it will automatically be called any time you concatenate an object of the class with a string.
a. ToString
b. PlusString
c. StringConvert
d. ConcatString
a
Making an instance of one class a field in another class is called
a. nesting
b. class fielding
c. aggregation
d. concatenation
c
A class whose internal state cannot be changed is known as a(n) _______ class.
a) Foundational b) Concrete c) Mutable d) Immutable
d
The ________________keyword can be used by an object to refer to itself.
a) callingObject b) this c) me d) instance
b
The .NET runtime system periodically performs this process, which automatically removes unreferenced objects from memory.
a) Memory cleansing b) Memory deallocation c) Garbage collection d) Object expungement
c
1. When an object is passed as an argument to a method, the method can access the argument
t
2. A method cannot return a reference to an object.
f
3. You can write a method that returns null.
t
4. Reference variables can be initialized with null, but you cannot assign null to a reference variable after it has been initialized
f
If you try to check a reference variable to determine whether it is equal to null, an exception will be thrown.
f
6. You can pass null as an argument to a method.
t
7. If an immutable class has a mutable object as a field or property, it is permissible for a method in the immutable class to return a reference to the mutable field or property
f
If an immutable class's constructor accepts a reference to a mutable object, that reference should not be stored in a field.
t
9. If a reference field is declared as readonly, it means the internal state of the object that the variable refers to cannot be changed
f
10. When you declare a reference field as readonly, and then initialize it with a reference to an object, the reference variable cannot refer to any other object
t