DEV Community

Discussion on: Code Smell 61 - Coupling to Classes

Collapse
 
chrisza4 profile image
Chakrit Likitkhajorn

I am confused. The solution said that favor loose coupling and the conclusion favor dependency on to the interface. But in the wrong example, MyDomain class depends on interface and in the right example it depends on class.

Maybe it is swapped?

Collapse
 
mcsee profile image
Maxi Contieri

thank you very much for pointing it out

last minute change. :)
Of course coupled.java was the wrong one!