You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

InnerMembers.java 785B

1234567891011121314151617181920
  1. public class InnerMembers {
  2. static class StaticI {
  3. static int x;
  4. static String foo() { return "foo"; }
  5. }
  6. class Inner {
  7. static final int CONST=10;
  8. static final int NOT_CONST=new Integer(10).intValue(); //ERR: non-constant static in inner
  9. static int x; //ERR: non-constant static in inner
  10. static String foo() { return "foo"; }//ERR: non-constant static in inner
  11. interface I {}//ERR: non-constant static in inner
  12. }
  13. public static void m() {
  14. class Inner {
  15. static final int CONST=10;
  16. static int x; //ERR: non-constant static in inner
  17. static String foo() { return "foo"; }//ERR: non-constant static in inner
  18. }
  19. }
  20. }