package?com.imooc.javabeginner.second.weatherforecast;
import?com.imooc.weather.HourWeather;
import?com.imooc.weather.WeatherUtils;
import?com.imooc.weather.impl.WeatherUtilsImpl;
import?java.util.List;
import?java.util.Scanner;
public?class?QueryWeather?{
????public?static?void?main(String[]?args)?{
????????String?appCode?=?"xxxxxx";
????????System.out.println("可以選擇的服務(wù)如下所示:");
????????System.out.println("1:查詢(xún)24h內(nèi)的天氣信息");
????????System.out.println("2:?查詢(xún)3天內(nèi)的天氣信息");
????????System.out.println("3:?查詢(xún)7天內(nèi)的天氣信息");
????????System.out.print("請(qǐng)選擇所需服務(wù)的代號(hào):");
????????Scanner?scanner?=?new?Scanner(System.in);
????????int?i?=?scanner.nextInt();
????????if?(i?==?1){
????????????System.out.print("請(qǐng)輸入所需查詢(xún)天氣的城市名稱(chēng):");
????????????String?city?=?scanner.next();
????????????WeatherUtils?weatherUtils?=?new?WeatherUtilsImpl();
????????????List<HourWeather>?weatherList?=?weatherUtils.w24h(appCode,?city);
????????????System.out.println(weatherList);
????????}
????}
}

2021-03-10
你第26行appcode要輸入那串控制臺(tái)授權(quán)碼
2021-02-28
我也是,求問(wèn)
2021-02-03
我也是,求問(wèn)