What are the default values assigned to variables and instances in Java?
In Java, variables and instances are assigned default values depending on their data types when they are declared but not explicitly initialized. Here’s a summary of the default values for each data type:Primitive Data Typesbyte: 0short: 0int: 0long: 0Lfloat: 0.0fdouble: 0.0char: '\u0000' (null ch