The default values for the primitive data types in Java are as follows:
byte: 0
short: 0
int: 0
long: 0L
float: 0.0f
double: 0.0d
char: ‘\u0000’ (null character)
boolean: false
String (or any object) null
Notes
- ‘\u0000’ is unicode escape sequences / unicode escape character.
Tidak ada komentar:
Posting Komentar