Skip to content

Instantly share code, notes, and snippets.

@Hariofspades
Last active November 18, 2017 07:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hariofspades/80381a9823c4b7ca4e8c89673e231d2e to your computer and use it in GitHub Desktop.
Save Hariofspades/80381a9823c4b7ca4e8c89673e231d2e to your computer and use it in GitHub Desktop.
Explaining dependency
class Targaryens {
public Targaryens() {
//Each time we use Targaryens, we need to create Dragons instance
Dragons dragons = new Dragons();
dragons.callForWar();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment