static class and singleton

前端 未结 5 1745
谎友^
谎友^ 2020-12-14 21:04

Isn\'t a class with all static members/methods a kind of singleton design pattern? Is there any disadvantage in particular of having such classes? A detailed explanation wo

5条回答
  •  被撕碎了的回忆
    2020-12-14 21:17

    Robert C. Martin wrote an article some times ago about the differences between the mono state pattern and the singleton pattern.

提交回复
热议问题