Nov 6, 2014

What happens if you dont 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(zero), a boolean will be initialized to false.

0 comments:

Post a Comment