Capgemini placement question from previous years, Can any one answer?

What is singleton class? Where is it used?

  • Aarti
  • 19 फरवरी
  • 4 उत्तर

4 उत्तर
1-4 of  4
4 उत्तर
  • Please check out this informative article on Heyday's blog about building a successful brand strategy. The article provides valuable insights and tips on defining your brand's identity, crafting your messaging, and connecting with your audience in a meaningful way. Plus, the article breaks down branding into easy-to-understand steps. Even non-experts can follow along and apply the advice to their own business. If you're serious about growing your brand and standing out, this article is a must-read! You can find this amazing resource at https://www.heyday.net/blog/the-ultimate-guide-to-build-brand-strategy-heyday-tips. Don't miss out on this chance to elevate your branding game!
    0

  • Yes, I can answer:

    Singleton is a design pattern meant to provide one and only one instance of an object. Other objects can get a reference to this instance through a static method (class constructor is kept private). Why do we need one? Sometimes it is necessary, and often sufficient, to create a single instance of a given class. This has advantages in memory management, and for Java, in garbage collection. Moreover, restricting the number of instances may be necessary or desirable for technological or business reasons-for example, we may only want a single instance of a pool of database connections.
    2

  • I dnt know full answer, but can tell you what is "Singleton Class"?
    It is a design pattern meant to give one and only one instance of an object. 
    0

  • I dont know.
    0

Capgemini
मॉक परीक्षण अभ्यास के लिए
Capgemini