Java 什么';onSaveInstanceState()事件中savedInstanceState和outState之间的区别是什么?
那么它们之间的区别是什么呢?我搜索了大约半个小时,仍然没有任何线索!在onSaveInstanceState()事件中,我看到有人使用了outState,有人使用了savedInstanceState,当我在Eclipse中键入Ctrl+Space时,它只显示“Bundle outState”作为参数Java 什么';onSaveInstanceState()事件中savedInstanceState和outState之间的区别是什么?,java,android,Java,Android,那么它们之间的区别是什么呢?我搜索了大约半个小时,仍然没有任何线索!在onSaveInstanceState()事件中,我看到有人使用了outState,有人使用了savedInstanceState,当我在Eclipse中键入Ctrl+Space时,它只显示“Bundle outState”作为参数 public void onSaveInstanceState(Bundle onState){...}; public void onSaveInstanceState(Bunble save
public void onSaveInstanceState(Bundle onState){...};
public void onSaveInstanceState(Bunble savedInstanceState){...};
//what is the difference between them?
p/S:很抱歉这个“nooby”问题,但我是一个初学者,我正试图自己解决它,所以。。。
谢谢你的帮助 它们之间没有实际区别。捆绑包作为参数传递给方法,这是您分配给它的名称,以便您可以在方法中引用它
public void onSaveInstanceState(Bundle onState){
onState.getInt.....
public void onSaveInstanceState(Bunble savedInstanceState){
savedInstanceState.getInt...
public void onSaveInstanceState(Bunble whatEverYouLike){
whatEverYouLike.getInt...
他们都一样 这只是一个变量名,你可以随意使用,是的,谢谢你的帮助:多谢