 private static final String API_KEY = "000cfe0b0ff000db00e000a0ab0abb00" ; private static final String ENDPOINT = "http://api.openweathermap.org/data/0.0/weather?q=%s&appid=%s" ; private String buildEndpoint ( String city, String countryCode ) { return String . format ( ENDPOINT, ( countryCode != null ? city + "," + countryCode : city ) , API_KEY ) ; } private static final String API_KEY = "000cfe0b0ff000db00e000a0ab0abb00"; private static final String ENDPOINT = "http://api.openweathermap.org/data/0.0/weather?q=%s&appid=%s"; private String buildEndpoint(String city, String countryCode) { return String.format(ENDPOINT, (countryCode != null ? city+","+countryCode : city), API_KEY); } 