Skip to content

Instantly share code, notes, and snippets.

@shkcodes
Last active August 5, 2018 04:22
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 shkcodes/30f9d9165a4dc32dacc6c560c1cf81dd to your computer and use it in GitHub Desktop.
Save shkcodes/30f9d9165a4dc32dacc6c560c1cf81dd to your computer and use it in GitHub Desktop.
class A {
private B objectB;
public A(B objectB) {
this.objectB = objectB;
}
public int doSomeWork() {
int result = objectB.getResult();
int finalResult = result * 2;
return finalResult;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment