拉小弟我一把:帮忙解释一段android中java代码用法

   阅读
拉我一把:帮忙解释一段android中java代码用法
初学android开发,看了一段代码:

@Override
protected void onPause() 
{
// TODO Auto-generated method stub
super.onPause();
// Save user preferences. use Editor object to make changes.
  SharedPreferences settings = getSharedPreferences(PREF, 0);
  settings.edit()
  .putString(PREF_HEIGHT, field_height.getText().toString())
  .commit();
}
由于对java不太熟悉,如下这行代码是什么用法,用的什么java语法?什么含义?
settings.edit()
  .putString(PREF_HEIGHT, field_height.getText().toString())
  .commit();


------解决方案--------------------
Java code
Editor editor = settings.edit();
String text =  field_height.getText().toString();
editor.putString(PREF_HEIGHT, text);//Returns a reference to the same Editor object, so you can chain put calls together.
editor.commit();
阅读