Design Patterns - PowerPoint PPT Presentation

1 / 3
About This Presentation
Title:

Design Patterns

Description:

Design Patterns. Singleton. Want to make sure that only one instance will be ... Examples are factory. Singleton. Public class Singleton ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 4
Provided by: weite7
Category:

less

Transcript and Presenter's Notes

Title: Design Patterns


1
Design Patterns
2
Singleton
  • Want to make sure that only one instance will be
    produced, this is to ensure that the instance
    will be unique.
  • Examples are factory.

3
Singleton
Public class Singleton Static public
Singleton getInstance() //note the static
method If (theInstance null)
TheInstance new Singlenton
() return theInstance   protected
Singleton () // initialize instance
field   private static Singlton theInstance
null
Write a Comment
User Comments (0)
About PowerShow.com