Back to project page AndroidLibraryProject.
The source code is released under:
Apache License
If you think the Android project AndroidLibraryProject listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.frameworktestcase; // www . j a v a2 s . c o m import android.util.Log; public class Singleton { private static Singleton singletonInstance; private final String TAG = "Singleton"; private Singleton() { Log.d(TAG,"singleton Constructor"); } public static synchronized Singleton getInstance() { if (singletonInstance == null) singletonInstance = new Singleton(); return singletonInstance; } public void doSomething(String value) { Log.d(TAG,value); } }