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-- |
jtulach@343 | 1 |
package org.apidesign.singletons.usage; |
jtulach@343 | 2 |
|
jtulach@345 | 3 |
// BEGIN: singletons.injectable.usage |
jtulach@343 | 4 |
import org.apidesign.singletons.api.DialogDisplayer; |
jtulach@343 | 5 |
|
jtulach@343 | 6 |
public class Main { |
jtulach@343 | 7 |
public static void main(String[] args) { |
jtulach@343 | 8 |
if (DialogDisplayer.getDefault().yesOrNo("Do you like singletons?")) { |
jtulach@343 | 9 |
System.err.println("OK, thank you!"); |
jtulach@343 | 10 |
} else { |
jtulach@343 | 11 |
System.err.println( |
jtulach@343 | 12 |
"Visit http://singletons.apidesign.org to change your mind!" |
jtulach@343 | 13 |
); |
jtulach@343 | 14 |
} |
jtulach@343 | 15 |
} |
jtulach@343 | 16 |
} |
jtulach@345 | 17 |
// END: singletons.injectable.usage |