使用接口获取天气

public static String getWeather(String city) throws MalformedURLException, IOException { String cityName=URLEncoder.encode(city,"UTF-8");//城市名 String url="//这里写你调用的天气接口,例如心知api,聚合api 有免费的天气接口"; URL
相关文章
相关标签/搜索