Client:
for(int j=0;j<prod10.length;j++){
            String ret_val ="";
            bean.setProd10(prod10[j]);
            ret_val=build.saveRSupplier(bean);
        }
DAO:
if(rs.next()){
                String sum=rs.getString("max(patient_no)+1");
                String q7="insert into new8(ok, reference)"
                        + " values('"+sum+"','"+purid10+"')";
                PreparedStatement p7 = con.prepareStatement(q7);
                int s7 = p7.executeUpdate();        
            }
if i put value in array then by using prod10 it set the length and array of data are stored in the database but if i do not put value in array null point exception occur,this should not have to happen what i should have to do for this
 
     
    