When I tried this:
当我尝试这个:
JSONObject xyz = new JSONObject();
JSONArray abc = new JSONArray();
while(rs.next())
{
String a = rs.getString("enrollno");
String b = rs.getString("name");
xyz.put("no" , a);
xyz.put("name" ,b);
abc.put(xyz);
System.out.println(abc.toString());
}
JSONObject xyz =