Activity Forums Salesforce® Discussions Why can't we use static class instead of Singleton?

  • Anjali

    Member
    December 21, 2020 at 2:09 pm

    Static means that it belongs to a class it is in and not to any instance. So it cannot be a top level class. - Static class will have all its member as static only unlike Singleton. - It can be lazily loaded whereas static will be initialized whenever it is first loaded.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos