Hello Iam jasmine,
Well use statement.getResultSet(); which will return the refernce of ResultSet interface and the use next() method of resultset and then put in the loop as resulset will retrun the object. then use resultset.getString() method.
so code would be
ResutlSet rs=statement.getResultSet();
while(rs.next())
{
String s1=rs.getString(int column index);
out.println(s1);
}
but dont forget to close the resultset and put try and catch .
So I hope this will solve ur problem.
Thanks
Jasbir