Created with <3 with dartpad.dev.
Created
February 7, 2023 03:34
-
-
Save randy-johnson/c258dfc9fd4e2235c454ca74d4aae6a7 to your computer and use it in GitHub Desktop.
quintessential-utopia-9882
This file contains 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
class Person { | |
String? name; | |
int? age; | |
Person(String name, int age){ | |
this.name = name; | |
this.age = age; | |
} | |
} | |
int addNumbers(int num1, int num2) { | |
return num1 + num2; | |
} | |
void main() { | |
var p1 = Person('Randy',30); | |
var p2 = Person('Mandy',25); | |
print(p1); | |
print(p1.name); | |
print(p1.age); | |
print(p2.name); | |
print(p2.age); | |
int firstResult = addNumbers(1, 23); | |
int secondResult = addNumbers(6, 7); | |
print(firstResult); | |
print(secondResult); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment