samples/singletons/src/org/apidesign/singletons/usage/Main.java
changeset 343 8e220093e4bf
child 345 f497cf8621b3
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/samples/singletons/src/org/apidesign/singletons/usage/Main.java	Wed Jan 27 18:30:57 2010 +0100
     1.3 @@ -0,0 +1,15 @@
     1.4 +package org.apidesign.singletons.usage;
     1.5 +
     1.6 +import org.apidesign.singletons.api.DialogDisplayer;
     1.7 +
     1.8 +public class Main {
     1.9 +    public static void main(String[] args) {
    1.10 +        if (DialogDisplayer.getDefault().yesOrNo("Do you like singletons?")) {
    1.11 +            System.err.println("OK, thank you!");
    1.12 +        } else {
    1.13 +            System.err.println(
    1.14 +                "Visit http://singletons.apidesign.org to change your mind!"
    1.15 +            );
    1.16 +        }
    1.17 +    }
    1.18 +}