ExamVeda
Login
Home
Data Types and Variables
?

What is the default value of an int variable in Java if it's not explicitly initialized?

Answer & Solution
Correct Answer: Option A
The correct answer is Option A: 0.

In Java, if an int variable is not explicitly initialized, it will be assigned the default value of 0.

This default value is used when no initial value is provided for an integer variable.

Option B, Option C, and Option D are not the default values for an uninitialized int variable in Java.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.