Skip to content

Instantly share code, notes, and snippets.

@PatilShreyas
Created March 14, 2020 18:04
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 PatilShreyas/355c9117bed0c6e4005513dae7dae0c1 to your computer and use it in GitHub Desktop.
Save PatilShreyas/355c9117bed0c6e4005513dae7dae0c1 to your computer and use it in GitHub Desktop.
package life;
import javax.inject.Inject;
public class Life {
public Needs mNeeds;
@Inject
public Life(Needs needs) {
this.mNeeds = needs;
}
public void enjoy() {
if (mNeeds.fulfilled()) {
System.out.println("I'm enjoying my life! :)");
} else {
System.out.println("I can't enjoy my life :(");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment