Retrieving Data in Java
问题 I'm a java novice. Is it possible to get data from a website and then store it in some sort of data structure? For example, the program gets the value of a stock from yahoo finance at a given time and stores it. Like I said, I'm not that proficient with Java and I'd like to know if this could be done. If it can be, is it very hard to do it? 回答1: public class GetYahooData { public ArrayList<JSONObject> getOutputFromUrl(String url) { ArrayList<JSONObject> output = new ArrayList<JSONObject>();