Home > Back-end >  Java member variables (instance variables) default value problem
Java member variables (instance variables) default value problem

Time:11-28

Beginners, general already knows, my question is: there are two classes, A {} and {} B, in which A inside A {B B; }, my question is the B B B have initial value? If you have what is?

Or say that there is no new object b doesn't exist so no assignment or initialization, the problem of how to understand my

thank you

CodePudding user response:

If there is no new, the default value is null

CodePudding user response:

The default value is null reference types

CodePudding user response:

The default value of reference object is empty

CodePudding user response:

The default value is null
  • Related