How to write my code more better

Date:     Updated:

Categories:

Tags:

Coding tips for zero dependencies ✏️



1. What is Dependency?


🔔  


2. What does it mean that interfaces reduce code dependencies?


🔔  

Code dependency refers to the degree of coupling between each method, and using an interface means that when one method is modified, the situation where other methods have to be modified as well is reduced. When an abstract method is specified as an interface, the input and output values of the method are fixed. For example, the public abstract String myName(String name) method has both input and output values fixed to String. No matter how much you modify the object that implements this method, the input and output values are fixed as String, so the change has little effect. That’s why we say that interfaces are “resilient to change” and “open to extension and closed to change.”


3.



References

https://yenbook.tistory.com/57
https://velog.io/@dani0817



🌜 This is my personal study blog!  
  If you find any errors or mistakes, please feel free    
  to point them out in the comments or via email. 💌
   I would greatly appreciate it! 😄✨💛

Go to Top

Other Posts In Coding

Leave a comment