Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@arehmandev
Created May 1, 2018 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arehmandev/04dbcde599f24c98a9039ac77818790f to your computer and use it in GitHub Desktop.
Save arehmandev/04dbcde599f24c98a9039ac77818790f to your computer and use it in GitHub Desktop.
groovy class
class Example {
String name;
int ID;
static void main(String[] args) {
Example man = new Example()
man.getStudent()
println(man.name + " is " + man.ID)
}
def getStudent() {
this.name = "Joe";
this.ID = 1;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment