java - Default values of instance variables and local variables -
i read java provides default values class properties not local variables. correct? if reason behind this? when doing good, why not way?
thanks,
roger
standard local variables stored on stack , aren't created until initialized. if local variable isn't used, doesn't go on stack. member variables, however, allocated in heap, , thusly have default placeholder (null reference or default primitive).
Comments
Post a Comment