Created
March 14, 2020 18:04
-
-
Save PatilShreyas/355c9117bed0c6e4005513dae7dae0c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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