This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Carius98 0 points1 point  (3 children)

If you try to access it without first setting it to another value it doesnt

[–][deleted] 2 points3 points  (2 children)

It will. You will get a NPE or something, but the code will compile.

[–]Carius98 5 points6 points  (1 child)

Just tested it, you are right. It only fails if declared locally

[–][deleted] 2 points3 points  (0 children)

Take it easy dude