如何将while循环放入线程? public class Weather {
public static void main(String[] args) throws UnknownHostException, IOException {
String host = "rainmaker.wunderground.com";
int port = 3000;
我想知道下面的代码是否正确地使用try-with-resources。 try (ResultSet rs = new QueryBuilder(connection, tableName(), getPaths(), searchQuery()).add(constraint).build().executeQuery()) {
while (rs.next()) {
be