* sreal.h (sreal::shift): Fix sanity check.
[official-gcc.git] / libjava / testsuite / libjava.lang / PR19870.java
blobf9e6bc31895be7aa1ee4c7b8be36dbbc5a4c60f8
1 // PR19870: Test static field access across nested class boundaries.
2 //
3 public class PR19870
5 private static int x = 123;
7 static class Foo
9 private static int junk = 1000;
11 static void snafu( )
13 System.out.println( x);
14 x = 456;
15 System.out.println( PR19870.x);
16 PR19870.x = 789;
17 System.out.println( PR19870.x);
19 System.out.println( Bar.junk);
23 static class Bar
25 private static int junk = 1984;
27 static void snafu( )
29 System.out.println( Foo.junk);
30 Foo.junk = 2000;
31 System.out.println( Foo.junk);
35 public static void main( String[] args)
37 Foo.snafu( );
38 Bar.snafu( );
40 System.out.println( Foo.junk);
41 Foo.junk = 3000;
42 System.out.println( Foo.junk);