Skip to content

Instantly share code, notes, and snippets.

@muchirijane
Created September 17, 2019 08:28
Show Gist options
  • Save muchirijane/6d6a5b78c2b2c70b7b143d5b1aa98b74 to your computer and use it in GitHub Desktop.
Save muchirijane/6d6a5b78c2b2c70b7b143d5b1aa98b74 to your computer and use it in GitHub Desktop.
void main(){
Human jenny = Human(startingHeight: 15);
jenny.talk('Mommy');
print(jenny.height);
// Human james = Human(20);
// print(james.height);
}
class Human {
double height;
int age = 0;
Human({double startingHeight}){
height = startingHeight;
}
void talk(String whatToSay){
print(whatToSay);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment