Android Studio pref Editor.putString identifier expected : <p>Getting a - cannot resolve symbol   "putString" "putInt" "commit" - in     the code below.Help please.</p>

<pre><code>      public class Alpha extends Activity {

      public static final String GAME_PREFERENCES = "GamePrefs";
      SharedPreferences settings =getSharedPreferences(GAME_PREFERENCES,MODE_PRIVATE);

      SharedPreferences.Editor prefEditor = settings.edit();
      prefEditor.putString("Gama x","Blue Spec");
      prefEditor.putInt("Wave",292);
      prefEditor.commit();


 }
</code></pre>
