只是为了在Java中清楚地表达出来。
原始类型:
这是一个声明权:
int a;//declared but unitialized
初始化和赋值:
a = 1;//intialization and assignment
a = 2;//this is no longer intialization but still an assignment the 2nd time?
int b = 1;//declaration and intialization = assignment combined?
b = 2;//just assignment because 2nd time?
班级类型:
String str;//declaration
str = "some words";//this is also an intialization and assignment?
str = "more words"; //since new object still both intialization and assignment even 2nd time?