Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Coupling question

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there, I have problems understanding the coupling topic expectations for the exam (SCJP 1.5), is there any good examples that could illustrate this concept and what is the exam expecting us to know?, thanks in advance.
 
Ranch Hand
Posts: 1585
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K&B book.
 
Serch Hdez
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks but I read it and it wasn't clear... :S.. does somebody know any other sources for that?
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Loose coupling refers to minimizing the dependence of an object on other objects. In other words, you can change the implementation of a class without affecting the other classes.These properties make the code extensible and easy to maintain.

For example, consider two classes, A and B. If they do not use each other at all (neither of them instantiates the other, invokes a method on the other, and so on), they are not coupled. If A uses B (for example, instantiates B) but B does not use A, then they are loosely coupled. If both A and B use each other, then they are tightly coupled.

Another criterion of loosely coupled classes is how they access each other�s members. Loose coupling demands that a class keep its members private and that the other class access them
through getters and setters
 
Their achilles heel is the noogie! Give them noogies tiny ad!
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!