author | Jaroslav Tulach <jtulach@netbeans.org> |
Wed, 27 Jan 2010 20:49:32 +0100 | |
changeset 345 | f497cf8621b3 |
parent 343 | 8e220093e4bf |
child 376 | bb34a70d36ba |
permissions | -rw-r--r-- |
1 package org.apidesign.singletons.usage;
3 // BEGIN: singletons.injectable.usage
4 import org.apidesign.singletons.api.DialogDisplayer;
6 public class Main {
7 public static void main(String[] args) {
8 if (DialogDisplayer.getDefault().yesOrNo("Do you like singletons?")) {
9 System.err.println("OK, thank you!");
10 } else {
11 System.err.println(
12 "Visit http://singletons.apidesign.org to change your mind!"
13 );
14 }
15 }
16 }
17 // END: singletons.injectable.usage