What are the initial values of the primitives that are encapsulated in an object?

What are the initial values of the primitives that are encapsulated in an object, and what are the initial values of the primitives that are not encapsulated in an object?
6 Replies
JavaBot
JavaBot2w ago
This post has been reserved for your question.
Hey @SidKid! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st2w ago
false for booleans, 0 (which is \0 for char) for others
Kyo-chan
Kyo-chan2w ago
Same for static variables. As for local variables, they don't have an initial value. They can't be read before they're assigned a value.
0x150
0x1502w ago
ß?
dan1st
dan1st2w ago
\0
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?