constructors

This commit is contained in:
2020-05-10 16:07:27 +02:00
parent d6f2d44eaf
commit b9c03f8207
15 changed files with 257 additions and 1 deletions

14
lessons/Constructors.md Normal file
View File

@ -0,0 +1,14 @@
# Constructors
Constructors are a way to give data to an object right when it gets created. The
object can also run functions on that data during construction.
Constructors should only be used to initialize data which the object needs to
function.
## Code examples and language specific explanations
- [Java](../java/constructors/README.md)
- [Rust](../rust/constructors/README.md)
- [C++](../cpp/constructors/README.md)
- [JavaScript (using TypeScript)](../typescript/constructors/README.md)