summaryrefslogtreecommitdiff
path: root/tutorial/examples/decorator/Test.oj
diff options
context:
space:
mode:
Diffstat (limited to 'tutorial/examples/decorator/Test.oj')
-rw-r--r--tutorial/examples/decorator/Test.oj21
1 files changed, 21 insertions, 0 deletions
diff --git a/tutorial/examples/decorator/Test.oj b/tutorial/examples/decorator/Test.oj
new file mode 100644
index 0000000..3989a56
--- /dev/null
+++ b/tutorial/examples/decorator/Test.oj
@@ -0,0 +1,21 @@
+package examples.decorator;
+
+
+import java.io.Writer;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+
+
+public class Test
+{
+ public static void main(String[] args) {
+ Writer baseout
+ = new ReturnSpecifier(System.out) decorates OutputStreamWriter;
+ PrintWriter out = new PrintWriter(baseout);
+ out.println( "Hi there." );
+ out.println( "This is a test." );
+ out.println( "Thank you." );
+ out.flush();
+ }
+
+}