title: How to call methods in onCreate (when the app starts)
body: <p>I have MainActivity.class that has some methods. 
  Here is the method I want to call when the app starts:</p>
  
  <pre><code>public void loadGame(View view) {
      SharedPreferences loadGame = getSharedPreferences(PREFS, MODE_PRIVATE);         
      cashView.setText("cash: " + String.valueOf(cash));
      levelView.setText("level: " + String.valueOf(level));
  }
  </code></pre>
  
  <p>So I try to type in the following in my onCreate method:</p>
  
  <pre><code>loadGame();
  </code></pre>
  
  <p>But I get an error: 
  <strong><em>(View)</strong> in <strong>MainActivity</strong> cannot be applied to <strong>()</em></strong></p>
  
  <p>Sorry for such a silly question but I don't get it. 
  I thought that onCreate and other activity methods are similar to main method in Java (but they are not), but still I can easily assign a method for Button onClick. Why can't I call a method when the app starts? Any solution?</p>
  
  <p>upd: MainActivity code:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
      private int cash = 1000;
      private int level = 1;
      private TextView cashView;
      private TextView levelView;
  
      public static final String PREFS = "MySavedGameFile";
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
       //the compiler says it cannot resolve symbol 'view'
       //  loadGame(view);
       //I need to call the method anyway
          cashView = (TextView) findViewById(R.id.cashView);
          levelView = (TextView) findViewById(R.id.levelView);
  
      }
       public void loadGame(View view) {
          SharedPreferences loadGame = getSharedPreferences(PREFS, MODE_PRIVATE);
          cash = loadGame.getInt("savedCash", 1000);
          level = loadGame.getInt("savedLevel", 1);
          cashView.setText("Cash: " + String.valueOf(cash));
          levelView.setText("Level: " + String.valueOf(level));
  </code></pre>