I believe that this question has value on the site and should be undeleted.
Unlike the duplicate target that asks about "what is" an NPE and "how to fix" it, this question asks for all an exhaustive list of all the possible ways to get an NPE. I think it is a question that many people who gets frustrated over NPEs would be wondering about, as can be seen by the 4 upvotes on the question.
On the one hand, if you combine all the duplicate target's answers, you can still get a list of possible ways to get an NPE. On the other hand however, you don't get an argument for the exhaustiveness of the list. You also have to look through all 12 undeleted answers there, which takes a long time.
If this question is undeleted, one can simply go to that question to find an answer (note: my answer) that has everything compiled instead. In my answer I also mentioned using method references on a null reference, which apparently no answer in the duplicate target did.
According to this, the post should not have been deleted because it serves as a good signpost to the duplicate. One may encounter an NPE because of the same reason as the OP, and wonders what other ways an NPE could occur. In this case this question would be very useful, because not only does the person sees a comprehensive list of situations in which an NPE occurs, they can also go to the duplicate target to get information about how to fix it.
I am also open to the idea of posting my answer, which shows a rather exhaustive list, to the duplicate target, but I'm not sure if it actually answers the "how to fix it" part of the duplicate question, and also because the duplicate question is locked and I can't post new answers :(
(Note that I'm not also saying the question should not be a duplicate as well. I think it would be a great pointer to the duplicate target.)
Screenshot for the under 10k:
NullPointerException
and throw it. That's the list. None of these cases are surprising if you understand what unboxing is (contrary to the fancy name, it's just performing a basic function call), how string concatenation works (more function calls), and why upcasting is a no-op.