Skip to content

Instantly share code, notes, and snippets.

@MarcinusX
Created Oct 2, 2019
Embed
What would you like to do?
class Square {
int side;
int area() {
return side*side;
}
}
// możemy to skrócić do
class Square {
int side;
int area() => side * side;
}
// a nawet stworzyć getter, który jeszcze bardziej ułatwi dostęp
class Square {
int side;
int get area => side * side;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment