开发者

What type of class do I need for this?

I want to create a class that is usable without being instanced, but that can also be instanced. Similar to a math class I suppose.

T开发者_运维问答hanks


If you add static methods to the class, you can call them like this

 ClassName::staticMethod();

You are not stopped from also creating instances of this class.


A regular class with a constructor with static class functions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜