What happens if you dont initialize an instance variable of any of the primitive types in Java? Ans. Java by default initializes it to the default value for that primitive type. Thus an int will be initialized to 0(zero), a boolean will be initialized to false. - Study24x7
Social learning Network
14 Dec 2023 10:21 AM study24x7 study24x7

What happens if you dont initialize an instance variable of any of the primitive types in Java? Ans. Java by default initializes it to the default value for that primitive type. Thus an int will be initialized to 0(zero), a boolean will be initialized to false.

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles