From: bdemsky Date: Wed, 5 Oct 2011 17:38:48 +0000 (+0000) Subject: inner class test case X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=341d4403f74fcf038451444d065d7a6329212056;p=IRC.git inner class test case --- diff --git a/Robust/src/Tests/inner.java b/Robust/src/Tests/inner.java new file mode 100644 index 00000000..39ca0bd1 --- /dev/null +++ b/Robust/src/Tests/inner.java @@ -0,0 +1,31 @@ +public class inner { + int outer; + + + public static void main(String x[]) { + inner i=new inner(); + i.dotest(); + } + + public void dotest() { + outer=35; + t tmp=new t(); + tmp.print(); + } + + public class t extends innerpt { + int outer; + public t() { + t.this.outer=4; + } + + public void print() { + //should print 4 0 35 + + System.out.println(outer); + System.out.println(super.outer); + System.out.println(inner.this.outer); + } + } + +} \ No newline at end of file diff --git a/Robust/src/Tests/innerpt.java b/Robust/src/Tests/innerpt.java new file mode 100644 index 00000000..6e368d2a --- /dev/null +++ b/Robust/src/Tests/innerpt.java @@ -0,0 +1,4 @@ +public class innerpt{ + int outer; + +} \ No newline at end of file