Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

Methods and Functions

The difference between a method and a function is that a method is associated with a specific class (a task that an object of the class can perform), and a function is a user-defined block of code that is declared in code on the timeline or as part of a custom class (which in turn would be a method of that class).

Methods

Methods are functions written within a class. They are ready to be called when an object is required to perform a calculation, change a property, return a value, or perform any type of predefined action.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint