Why does the JVM initialise the data fields with default values if no constructors are defined in any class? What is the need for such a procedure of calling the default constructor?
Jump to Post
> Why does the JVM initialise the data fields with default values
AFAIK, design decision by the language implementors. Also makes sense since I wouldn't want the members of my newly created instance to have a value of 'undefined'.
> What is the need for such a procedure of …
All 2 RepliesReply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.