how can I change the code generated from "new -> Singleton"?

I prefered this implementation due to the bottleneck of using "synchronized":

public class Test {
private static Test ourInstance;

static {
outInstance = new Test();

public static Test getInstance() {
return ourInstance;

private Test() {

1 comment
Comment actions Permalink

Choose Options -> File Templates from the menu. There you can change existing templates or add new ones.


Please sign in to leave a comment.