Wanted to explore new way to implement Singleton Pattern.Can this implementation be consider as a singleton Pattern ? If No Please give suggestions to improve the code.
public interface Test {
Singleton single = new Singleton();
class Singleton {
int i = 10;
private Singleton(){}
}
}
Aucun commentaire:
Enregistrer un commentaire