Why does this code throw an exception?
<pre><code>import java.util.Scanner;


public class Main {

    /**
     * @param args
     */
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        Scanner scan=new Scanner(System.in);
        int i,j;
        int count = 0;
        int test=scan.nextInt();
        String[] con=new String[test];
        while(test&gt;0)
         {i=scan.nextInt();
         j=scan.nextInt();

             for(int k=i;k&lt;=j;k++)
             if(prime(k))
//***********the line below where i am getting nullpointer exception
            con[count].concat(k+"\n");


    test--;count++;}

    for( i=0;i&lt;con.length;i++)
        System.out.printf("%s\n",con[i]);
    }



    private static boolean prime(int k) {
        // TODO Auto-generated method stub
        if(k==2)
            return true;
        if(k%2==0)
            return false;
        for(int l=3;l&lt;=Math.sqrt(k);l=l+2)
        if(k%l==0)
            return false;
        return true;
    }

}
</code></pre>

<p>please somebody help me that how to get rid from this exception.</p>
