SyntaxFix
Write A Post
Hire A Developer
Questions
Use getters and setters to set the variable and make the default constructor private. Then use:
Singleton.getInstance().setX(value);