I am new to Java programming and I am learning it with some online tutorials. I have a few questions
Is Instance Initialization and Initialization Block the same, similarly what are static blocks. Could you give me an example that illustrates these both.
I watn to replace a constructor with an Initiaialization block Is it possible to do so and which initialization block do I have to use and what is the basic difference between them.
I don’t understand the difference between class initialization and class instantiation. I tried reading it but could not understand what they mean… It would be better if I could have some examples that show the differences and where class instantiation and class initialization occur.
Why do we need class initialization and instantiation? And what are the steps taken during initialization and instantiation
Can we produce different outputs where the only difference is in the order of declarations of static variables in java. Can you show me an example and how do we do that and why does that happen.