Cannot call instance method from static method
<p>i have this class and i just need help with the tostring inside the methods to actually show the result it give me an error that i cant use this in sattic context :</p>

<pre><code>public static void bubbleSort(Student[] array)

{
    for(int i=(array.length); i&gt;0; i--)
    {

        for(int j=1; j&lt;(array.length-i); j++) 
        {
             if( array[j].getName().compareTo(array[j+1].getName())&lt;0)

            {
                Student Temp = array[j];
                array[j] = array[j+1];
                array[j+1] = Temp;
            }

        }
    }

        String s = null;

    for (int i=0; i&lt;array.length; i++)
    {
    s= s+ getName()+" "+ getId() ; * the error is here under the getName and getid 
    } 
    System.out.print (s);


}
</code></pre>
