Created
April 23, 2019 19:35
-
-
Save GursheeshSingh/dd2fe9d5581dbda0e0e3cd9e961510d6 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
public class InstanceFactory { | |
public static ILogger initLogger(){ | |
return new FileLogger(); | |
} | |
} |
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
public class MainActivity extends AppCompatActivity { | |
private ILogger logger = InstanceFactory.initLogger(); | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
logger.log("onCreate() starts"); | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
logger.log("onCreate() ends"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment