From: Bernhard Urban Date: Sun, 20 May 2012 12:27:26 +0000 (+0200) Subject: tests: static classes X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mate.git;a=commitdiff_plain;h=46086d6e57026212fdfc83b150a264f2cff2f51c tests: static classes --- diff --git a/tests/StaticClass1.java b/tests/StaticClass1.java new file mode 100644 index 0000000..31957e1 --- /dev/null +++ b/tests/StaticClass1.java @@ -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 index 0000000..3f5f253 --- /dev/null +++ b/tests/StaticClass2.java @@ -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); + } +}