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