Q:

reduce the steps it takes to format string

working on finishing up an android application, though trying to tidy up a bit. I have this code where I have text view and an integer and im adding the int at the end by formatting, and then using .setText(temp) to display it to the screen for that text view. here is the code
    public void pink_pressed(View view) {
    correct = (TextView) findViewById(R.id.right);
    incorrect = (TextView) findViewById(R.id.wrong);
    String temp;
    if (count != 0 && !(count > NUMBER_ROUNDS)) {
        if (color == pink) {
            cor++;
            temp = String.format("correct    : %d", cor);
            correct.setText(temp);
        } else {
            inc++;
            temp = String.format("incorrect : %d", inc);
            incorrect.setText(temp);
        }
        start_pressed(view);
    }
}

specifically im wanting to reduce these two lines to one.
            temp = String.format("correct    : %d", cor);
            correct.setText(temp);

I tried things like:
correct.setText(R.@string.num_cor + cur);

or
correct.setText(R.@string.num_cor +Integer.toString(cur));

where num_cor is just the same string as "correct   : "
and ideas of a possible fix to this problem?

A:

Does this work:
correct.setText(getString(R.string.num_cor, cor));

Make sure you have the following in your strings:
<string name="num_cor">correct : %d</string>

