Skip to content

Instantly share code, notes, and snippets.

@raulraja
Created October 21, 2012 21:21
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 raulraja/3928549 to your computer and use it in GitHub Desktop.
Save raulraja/3928549 to your computer and use it in GitHub Desktop.
Sample Java Singleton
public class EarthService {
private final static EarthService instance = new EarthService();
private EarthService() {
}
public final static EarthService getInstance() {
return instance;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment