fork(2) download
  1. class Test
  2. {
  3. void m() {
  4. System.out.println("m ran");
  5. }
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. Test t = null;
  9. try {
  10. Runnable fn = t::m;
  11. }
  12. catch (NullPointerException npe) {
  13. System.out.println("Got an NPE");
  14. }
  15. }
  16. }
Success #stdin #stdout 0.09s 320576KB
stdin
Standard input is empty
stdout
Got an NPE