public void WeatherInfo(){
.......
String weatherLocation = weatherLoc[1].toString();
........
}
基本上我有这个充满活力的字符串,它是在一个名为WeatherInfo无效。如何从另一个void方法访问void方法中的字符串?
但我需要从另一个空白得到weatherLocation字符串,这样
public void WeatherChecker(){
YahooWeatherUtils yahooWeatherUtils = YahooWeatherUtils.getInstance();
yahooWeatherUtils.queryYahooWeather(getApplicationContext(), weatherLocation, this);
}
因此,我需要能够从这一空白访问weatherLocation。
我该怎么做?
调用它们的方法,而不是空洞。 Void只是方法的返回类型。 – Grammin