summaryrefslogtreecommitdiffstats
path: root/docs/html/training/basics/data-storage/shared-preferences.jd
diff options
context:
space:
mode:
Diffstat (limited to 'docs/html/training/basics/data-storage/shared-preferences.jd')
-rw-r--r--docs/html/training/basics/data-storage/shared-preferences.jd4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/html/training/basics/data-storage/shared-preferences.jd b/docs/html/training/basics/data-storage/shared-preferences.jd
index 67f45cb..099da67 100644
--- a/docs/html/training/basics/data-storage/shared-preferences.jd
+++ b/docs/html/training/basics/data-storage/shared-preferences.jd
@@ -115,7 +115,7 @@ present. For example:</p>
<pre>
SharedPreferences sharedPref = getActivity().getPreferences(Context.MODE_PRIVATE);
-long default = getResources().getInteger(R.string.saved_high_score_default));
-long highScore = sharedPref.getInt(getString(R.string.saved_high_score), default);
+int defaultValue = getResources().getInteger(R.string.saved_high_score_default);
+long highScore = sharedPref.getInt(getString(R.string.saved_high_score), defaultValue);
</pre>