《第一行代码》
public class FruitAdapter extends ArrayAdapter<Fruit> {
private int resourceId;
public FruitAdapter(Context context, int textViewResourceId, List<Fruit> objects) {
super(context, textViewResourceId, objects);
resourceId = textViewResourceId;
}
}
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
你可以这样认为:
说到底是一个标识符解析的顺序问题。
话说只要不造成混淆就可以不加this
当对象的属性名字与修改这个属性的方法的参数不重名,就可加可不加