John Jai wrote:
Don't tell me that these are primitives and are directly initialized to default values
Not all primitives are given a default value - or rather it depends on the variable and not type to get a default value.
Hi Jhon Jai , I want an example to understand the point you have mentioned.
As far as my knowledge the jvm first reads the statements then assigns default values to the variables declared,
then again jvm checks for the variables which are initialized the during declaration/initialization and assigns them with initialized values.
Am I correct let me know,please explain with an example.
And thanks for answering my qusetion.
Hi Campbell Ritchie thanks for your suggestion.
Let me know can I put a sysout statemnt which can print the values of variables while the jvm reads code statements before creation of object?
Of course I can debug my code and achieve that.