fork download
  1. import java.util.concurrent.Callable;
  2.  
  3. /* Name of the class has to be "Main" only if the class is public. */
  4. class Ideone
  5. {
  6. Callable<?> x = this::clone;
  7. Throwing z = super::finalize;
  8. Callable<?> y = super::clone;
  9.  
  10. interface Throwing {
  11. void run() throws Error;
  12. }
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:7: error: incompatible types: invalid method reference
	Throwing z = super::finalize;
	             ^
    finalize() has protected access in Object
Main.java:8: error: incompatible types: invalid method reference
	Callable<?> y = super::clone;
	                ^
    clone() has protected access in Object
2 errors
stdout
Standard output is empty