Referring to the Current Object.docx-Ref...
Referring_to_the_Current_Object.docx-Referring to the Current Object’s Members
Showing 1 out of 1
Referring to the Current Object.docx-Referring to ...
Referring_to_the_Current_Object.docx-Referring to the Current Object’s Members
Referring to the Current Object.doc...
Referring_to_the_Current_Object.docx-Referring to the Current Object’s Members
Page 1
Referring to the Current Object’s
Members with the
this
Reference
1. An object’s
this
reference refers to:
a) the object itself
b) what the programmer specified
c) the entry point of the program
d) None of the above.
Answer:
a
2. In a method in which a parameter has the same name as an instance variable, using the
this
reference allows you to refer to
.
a) the parameter
b) the instance variable
c) varies depending on the situation
d) None of the above
Answer:
b
3.
When should a program explicitly use the
this
reference?
a) accessing a private variable
b)
accessing a public variable
c) accessing a local variable
d) accessing a field that is shadowed by a local variable
Answer:
d
4. Having a
this
reference allows:
a) A method to refer explicitly to the instance variables and other methods of the object on
which the method was called.
b) A method to refer implicitly to the instance variables and other methods of the object on
which the method was called.
c) An object to reference itself.
d) All of the above.
Answer:
d


Ace your assessments! Get Better Grades
Browse thousands of Study Materials & Solutions from your Favorite Schools
Florida Agricultural and ...
Florida_Agricultural_and_Mechanical_University
School:
Introduction_to_C_Sharp_Syntax
Course:
Great resource for chem class. Had all the past labs and assignments
Leland P.
Santa Clara University
Introducing Study Plan
Using AI Tools to Help you understand and remember your course concepts better and faster than any other resource.
Find the best videos to learn every concept in that course from Youtube and Tiktok without searching.
Save All Relavent Videos & Materials and access anytime and anywhere
Prepare Smart and Guarantee better grades

Students also viewed documents