What is a singleton on Java/Android?

A singleton is simple a class that can be instantiated, but only one instance can exist at a given time in the Java Virtual Machine (Or in Dalvik if you are using Android). Why is this useful? In the context of Android, you are the only one running on the JVM. Your phone is not Read More…