fork(1) download
  1.  
  2. import java.util.*;
  3.  
  4. class ThisShouldNotCompile {
  5. public static void main(String[] args) {
  6. new ArrayList() {
  7. {
  8. modCount++; // OK
  9. new ArrayList().modCount++; // not OK
  10. }
  11. };
  12. }
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:9: error: modCount has protected access in AbstractList
				new ArrayList().modCount++; // not OK
				               ^
1 error
stdout
Standard output is empty