1:成功abstractclassDomainObject{publicstaticfunctioncreate(){returnnewstatic();}}classUserextendsDomainObject{}classDocumentextendsDomainObject{}Document::create();2:失败abstractclassDomainObject{publicstaticfunctioncreate(){returnnewself();}}classUserextendsDomainObject{}classDocumentextendsDomainObject{}Document::create();我就想知道如何正确理解static,如何适度的使用static?
子衿沉夜
相关分类