FREE Subscription to Dr. Dobb’s Digest: Same Great Content, New Digital Edition
Site Archive (Complete)
Architecture & Design
Email
Print
Reprint

add to:
Del.icio.us
Digg
Google
Furl
Slashdot
Y! MyWeb
Blink
July 01, 2002

So What is a Java Event Agent?

(Page 4 of 9)
Jul02: Java Q&A


public class EventAgent
{
    // private constructor ensures no other instances
    private EventAgent() { }
    // static member variable and method enables callers 
    // to get to the one-and-only object instance
    private static final EventAgent SINGLE_INSTANCE = new EventAgent();
    public static EventAgent getInstance() 
    {
        return SINGLE_INSTANCE; 
    }
    ...
}

Example 3: The Singleton design pattern.

Previous Page | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 Next Page
TOP 5 ARTICLES
No Top Articles.



MICROSITES
FEATURED TOPIC

ADDITIONAL TOPICS

INFO-LINK