Google News
logo
Java - Interview Questions
What happens if you don’t initialize an instance variable of any of the primitive types in Java?
Java by default initializes it to the default value for that primitive type. Thus an int will be initialized to 0, a boolean will be initialized to false.
Advertisement