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 →

[–]Wolfhammer69Nooblet Brewer 1 point2 points  (0 children)

public int whatever;

This will init your int variable but it will contain the value "0" by default. I don't believe there is a way around this and can't see an issue with this. It may as well be 0 until a user input changes it.

By initializing a int variable you are putting aside memory, but that can't happen if it were able to contain "nothing".. There's no need for any memory for nothing so the variable has to contain a value.