why when i write this down :
private Statement getOrders_st=null;
public ResultSet getOrders(String UserName)
{
ResultSet Rs=null;
try
{
getOrders_st = Conn.createStatement();
Rs = getOrders_st.executeQuery("select order_history , ordr_date , ordr_total from orders where ordr_userid = '"+UserName.toLowerCase()+"'");
}
catch(SQLException ex)
{
ex.printStackTrace();
}
return Rs;
}
give NullPointerException at
getOrders_st = Conn.createStatement();
If Any One Know I would Be pleased to Have The Answer.