diff --git a/java/IsNullDemo.java b/java/IsNullDemo.java new file mode 100644 index 0000000000000000000000000000000000000000..6220a7a456320611bcc5866a0143c2ae0e4db7db --- /dev/null +++ b/java/IsNullDemo.java @@ -0,0 +1,14 @@ +public class IsNullDemo{ + public static boolean isNull(Example object){ + try { + object.isNull(); + }catch (NullPointerException e){ + return true; + } + return false; + } +} + +class Example{ + public void isNull(){} +} \ No newline at end of file