ICSE Class 9 Computer Applications
Question 14 of 14
Values and Data Types — Question 14
Back to all questions 14
Question Question 14
What is variable initialisation in Java? What are the default values of the following type of variables:
short, int, long, float, double, and char.
Variable initialisation means assigning value to a variable for the first time. Below are the default values of the different data types:
| Data Type | Default Value |
|---|---|
| short | 0 |
| int | 0 |
| long | 0L |
| float | 0.0f |
| double | 0.0d |
| char | '\u0000' |