Sunday, 28 April 2024

Static class benfits

 

 Key Points to Remember for a Technical Interview

  1. Static classes cannot be instantiated or extended.
  2. A static class can only contain static members.
  3. Static members are accessed via the class name, not an instance of the class.
  4. Static classes are sealed and therefore cannot be inherited.
  5. Static constructors are called automatically when a static member is referenced.
  6. Static members are initialized only once, at the class loading.
  7. The 'this' keyword is not available in static methods since they belong to the class, not an instance of the class.

No comments:

Post a Comment

Car pooling app

 I'll create a car pooling app with real-time vehicle tracking, pickup/drop time estimates, and a list of onboard users. Since we don...