On Monday, 25 June 2018 at 22:58:41 UTC, Jonathan M Davis wrote:
Java does try to force you to initialize stuff (resulting in annoying false positives at times), but in general, it still can't guarantee when a variable is null or not and is forced to insert runtime null checks.

Java can be somewhat clever about this though. Often it just needs to perform a single null check in a method body and thereafter knows the pointer can't be null and elides the check.

Reply via email to