tests: static classes
authorBernhard Urban <lewurm@gmail.com>
Sun, 20 May 2012 12:27:26 +0000 (14:27 +0200)
committerBernhard Urban <lewurm@gmail.com>
Sun, 20 May 2012 19:43:27 +0000 (21:43 +0200)
tests/StaticClass1.java [new file with mode: 0644]
tests/StaticClass2.java [new file with mode: 0644]

diff --git a/tests/StaticClass1.java b/tests/StaticClass1.java
new file mode 100644 (file)
index 0000000..31957e1
--- /dev/null
@@ -0,0 +1,13 @@
+package tests;
+
+public class StaticClass1 {
+       public static class SC {
+               public static void printMe(int huhu) {
+                       System.out.printf("I'm SC, and you say \"%d\"\n", huhu);
+               }
+       }
+
+       public static void main(String []args) {
+               SC.printMe(1337);
+       }
+}
diff --git a/tests/StaticClass2.java b/tests/StaticClass2.java
new file mode 100644 (file)
index 0000000..3f5f253
--- /dev/null
@@ -0,0 +1,18 @@
+package tests;
+
+public class StaticClass2 {
+       public static class SC {
+               public static int b;
+               public int hrm = 543;
+               public void printMe(int huhu) {
+                       System.out.printf("I'm SC %d %x, and you say \"%d\"\n", hrm, this.b, huhu);
+               }
+       }
+
+       public SC a = new SC();
+
+       public static void main(String []args) {
+               SC.b = 0x1337;
+               new StaticClass2().a.printMe(888);
+       }
+}