为什么有些人在方法中对字段变量进行新的引用?
public class Foo {
int mFoo[] = {1, 2, 3};
void method() {
int foo[] = mFoo; // WHY not just use mFoo?
print(foo[0]); // WHY not just use mFoo?
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
115 次 |
| 最近记录: |