ExamVeda
Login
Home
Data Types and Variables
?

What is the minimum value that can be stored in a char variable in Java?

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

In Java, a char variable is a 16-bit unsigned data type that can represent Unicode characters. The minimum value that can be stored in a char variable is 0, which corresponds to the Unicode character with the code point of zero.

Here's the breakdown:

Option A: 0 - This is the correct minimum value that can be stored in a char variable in Java. It represents the Unicode character with the code point of zero.

Option B: -128 - This value is not applicable to char variables in Java. It's more relevant to signed integer types.

Option C: -32768 - This value is not applicable to char variables. It's a range associated with short or int data types in Java.

Option D: 'a' - This represents the character 'a', not a numeric value, and it is not the minimum value that can be stored in a char variable.

So, the correct minimum value that can be stored in a char variable in Java is 0
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.