modou

The following chart summarizes the default values for the above data types.

Data Type Default Value (for fields)
byte 0
short 0
int 0
long 0L
float 0.0f
double 0.0d
char \'\u0000\'
String (or any object)   null
boolean false

转自:http://java.sun.com/docs/books/tutorial/java/nutsandbolts/datatypes.html

分类:

技术点:

相关文章: