Created
April 22, 2015 21:13
-
-
Save andrew-dixon/d31d8a3125b68ab70625 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Person | |
component { | |
static { | |
static.instanceCount=0; | |
} | |
public function init(required String firstName, required String lastName) { | |
this.firstName=arguments.firstName; | |
this.lastName=arguments.lastName; | |
static.instanceCount++; | |
} | |
public static numeric function personInstancesCreated() { | |
return static.instanceCount; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment