Code Editor
Object-Oriented Programming I

For Instance...

Good! A caveat, though: global variables can be changed from anywhere in your program, and they are generally not a very good idea. It's much better to create variables with limited scope that can only be changed from a few places!

For example, instance variables belong to a particular object (or "instance"). Let's get in some practice with instance variables! We've added our Person class from before to the editor.

Report a Bug
If you see a bug or any other issue with this page, please report it here.