oop-examples/lessons/Constructors.md

15 lines
490 B
Markdown
Raw Permalink Normal View History

2020-05-10 16:07:27 +02:00
# 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)
2020-05-10 16:10:11 +02:00
- [Rust](../rust/Constructors.md)
2020-05-10 16:07:27 +02:00
- [C++](../cpp/constructors/README.md)
- [JavaScript (using TypeScript)](../typescript/constructors/README.md)