How can i create a dangling pointer using Java?
String foo = null;
then if you try to say foo.substring(0), you'll get a NullPointerException.
foo.substring(0)
Is that what you mean?