As fields are implicitly private, why there is often explicit declaraion used in the books, articles etc.?
Because default access levels vary across languages, and many people program in more than one language. It's easy to become confused, either as the author or as someone reading the code later, thus explicit is nicer to deal with than implicit.
The problem with implicit declarations is that the reader cannot tell if whoever wrote the code wanted the implicit declaration or simply forgot to write anything. By being explicit there's no doubt about the intentions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With