Skip to content

Instantly share code, notes, and snippets.

@MarcinusX
Created October 2, 2019 19:02
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save MarcinusX/e1bb701f51e843aaa3f611d765cb25a1 to your computer and use it in GitHub Desktop.
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