基本上当我在Android Studio中覆盖一个方法时,我会得到参数名称,例如:
@Override
public void onStatusChanged(String s, int i, Bundle bundle) {
}
而其他人(来自教程等)获取参数名称,如:
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
至少给出了一些上下文的名称。
是否有设置来改善生成的参数名称?
答案 0 :(得分:0)
parameters names are depends on how to method is written in interface or abstract class.
interface A {
void add(int numberOne, int numberTwo);
}
interface C {
void addition(int i, int j);
}
class B implements A, C {
@Override
public void add(int numberOne, int numberTwo) {
}
@Override
public void addition(int i, int j) {
}
}
so its clear that parameters of override method is depends on how it is written in interface or abstract class.