public synchronized static void writeStockValues(ArrayList<Stock> stocks) {	

		File f = new File("stocks.txt");
		FileWriter fr = null;
		try {
			fr = new FileWriter(f);
			BufferedWriter br = new BufferedWriter(fr);
			String s = "";

			for (Stock e : stocks) {
				s += e.getTickername() + " " + e.getNo() + " " + e.getPrice();
				s += "\n";
			}
			br.write(s);
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}