View Single Post
  #5   Spotlight this post!  
Unread 06-11-2013, 09:52
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 945
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
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)
Reply With Quote