Singleton & theSingleton() { static Singleton instance; return instance; }
Which in the proper context is perfectly fine.
This is wrong:
class myclass { // can have state // ... public static myclass m = new myclass(); // globally accessible static instance, which can have state }
and the first link itself explain why.