- 论坛徽章:
- 0
|
1. When the primitive datas are the members of the class, you can uninitalize them, java can do the work for you. Please remember that it works just when the primitive datas are the members of the class.
2. The following code is not correct(legal in c/c++) according to the book:
{
int i;
{
int i;
}
}
But the members of the class and the members of functions can have the same name.
class a{
int a;
test() {
int a;
}
}
3. The static members of the class are sharing, if you change the value of the data in one object, the result will show in another object.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/15909/showart_359023.html |
|