3 ms·
The "fix" is to define an enum with one member named INSTANCE, if you need a Singleton. -- Effective Java, 2/ed, bu Josh Bloch
by trhtrsh 14y ago
The "fix" is to define an enum with one member named INSTANCE, if you need a Singleton.
-- Effective Java, 2/ed, bu Josh Bloch
- oconnor0 14y agoWhich only works if you need something that doesn't extend existing classes but only interfaces.