The 'this' keyword is used to: Access global variables Access local variables over class variables Differentiate between class and local variables when they have the same name Create new instances of the class
Added by Aaron C.
Close
Step 1
Step 1: The question asks what the keyword "this" is used for. Show more…
Show all steps
Your feedback will help us improve your experience
John Bell and 88 other AP CS educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
Which variables are created when an object is created with the use of the keyword 'new' and destroyed when the object is destroyed? Local variables, instance variables, class variables, static variables.
John B.
What is the benefit of encapsulation? A. To rename variables B. To reuse code C. To make all members public D. To make all members protected
Sanchit J.
Which Java keyword is used to refer to a class's hidden data fields? super static void this
Recommended Textbooks
Computer Science and Information Technology
Introduction to Programming Using Python
Computer Science - An Overview
Transcript
18,000,000+
Students on Numerade
Trusted by students at 8,000+ universities
Watch the video solution with this free unlock.
EMAIL
PASSWORD