Can't call static methods between activities
<p>I am trying to call a static method from another activity to find a integer for a score:</p>

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

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.highscore);

        TextView txtGuess = (TextView) findViewById(R.id.txtScore);
        int temp = MastermindGameActivity.getScore();
        String score = Integer.toString(temp);
        txtGuess.setText(score);

    }
}
</code></pre>

<p>by calling this method:</p>

<pre><code>public static int getScore()
{
    return score;
}
</code></pre>

<p>Why will this not work? I keep getting </p>

<blockquote>
  <p>01-14 21:28:54.347: ERROR/AndroidRuntime(1485): FATAL EXCEPTION: main
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485): java.lang.RuntimeException: Unable to start activity ComponentInfo{sam.android.mastermind/sam.android.mastermind.HighscoreActivity}: java.lang.NullPointerException
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1647)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at android.os.Handler.dispatchMessage(Handler.java:99)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at android.os.Looper.loop(Looper.java:123)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at android.app.ActivityThread.main(ActivityThread.java:3683)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at java.lang.reflect.Method.invokeNative(Native Method)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at java.lang.reflect.Method.invoke(Method.java:507)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at dalvik.system.NativeStart.main(Native Method)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485): Caused by: java.lang.NullPointerException
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at sam.android.mastermind.HighscoreActivity.blah(HighscoreActivity.java:27)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at sam.android.mastermind.HighscoreActivity.onCreate(HighscoreActivity.java:13)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
  01-14 21:28:54.347: ERROR/AndroidRuntime(1485):<br>
   ... 11 more</p>
</blockquote>

<p>The activity is defined in manifest.</p>
