- 1
Do all class constructors have to be public?
Does private constructors work the same way as public ones?
4 Answers
0
No, they can be private as well. In fact, any access modifier may be used, however there are specific times you'd want to use one access modifier over another.
- 1
@Drew Ski Oh ok. I wonder why this isn't mentioned in this app. Anyway thx for replying so fast :D
- 1
Actually, if you look in the More on Classes lesson, it is mentioned that they can be static and it is expanded on.
- 1
@Drew Ski Oh ill check it out. : )