ICSE Class 10 Computer Applications
Question 17 of 25
Values and Data Types — Question 17
Back to all questions 17
Question Question 17
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' |