fork download
  1. class Main
  2. {
  3. public static void main (String[] args) throws java.lang.Exception
  4. {
  5. //
  6. }
  7.  
  8. class Inner1
  9. {
  10. static void test(){}
  11. }
  12. static class Inner2
  13. {
  14. static void test(){}
  15. }
  16. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:10: error: Illegal static declaration in inner class Main.Inner1
		static void test(){}
		            ^
  modifier 'static' is only allowed in constant variable declarations
1 error
stdout
Standard output is empty