Singleton: Difference between revisions
m
J: minor clarification
No edit summary |
m (J: minor clarification) |
||
Line 500:
In J, all classes are singletons though their objects are not. (Class names may be used in any context where object references may be used.)
Singletons should not have a constructor so any attempt to construct an instance of a singleton (dyadic <code>conew</code>) would fail. Other than that, singletons are defined like any other class in J.
=={{header|Java}}==
|