Method toString cannot be applied to given types error in Android Studio
<p>I'm trying to learn Android by creating a calculator app. I have buttons with Ids <code>button0</code> to <code>button9</code>. On clicking the button, their value should be be added to textViewAbove but I can't seem to be able to convert an integer into a string. I feel that the Android studio is taking my <code>toString()</code> method to be of <code>integer.toString()</code> type. </p>

<p>Code: </p>

<pre><code>int[] buttonId = {R.id.button0, R.id.button1, R.id.button2, R.id.button3, R.id.button4,
        R.id.button5, R.id.button6, R.id.button7, R.id.button8, R.id.button9};


Button[] bt = new Button[10];
for (int i = 0; i &lt; 10; i++) {       //If this doesn't work then do it separately.
    final int I = i;
    bt[I] = (Button) findViewById(buttonId[I]);

    bt[I].setOnClickListener(
            new Button.OnClickListener() {
                public void onClick(View v) {

                    textViewAbove.append(toString(I));
                    //Enter action methods here.
                }
            }
    );
}
</code></pre>

<p>Error: </p>

<pre><code>Error:(111, 50) error: method toString in class Object cannot be applied to given types;
required: no arguments
found: int
reason: actual and formal argument lists differ in length
</code></pre>

<p>Note that the code is inside the <code>onCreate</code> method in the <code>MainActivity</code> class. </p>