|
Re: Java Code Question (Method Calling)
To expand further, to call SolarSystem's display method inside the SolarSystem class, you'd use just "display()" or "this.display()".
"this" is a reserved word that is a reference to the current object that the code is running in/from, and is usually implied, but there are cases where you'd want to use it (like a method having arguments named the same thing as class variables)
|