Q.java revision 0:9a66ca7c79fa
1/* /nodynamiccopyright/ */ 2// Q has overrides a deprecated method, 3// which will generate a warning when Q is entered 4class Q extends Q2 5{ 6 @Deprecated void foo() { } 7 void bar() { } // warning: override deprecated method 8} 9 10class Q2 { 11 @Deprecated void bar() { } 12} 13 14// Q3 is not required in order to compile Q or Q2, 15// and will therefore be attributed later 16class Q3 { 17 void baz() { new Q().foo(); } // warning: call deprecated method 18} 19