public void printResult(String fileName) {
		FileWriter fw = null;
		BufferedWriter bw = null;
		try {
			fw = new FileWriter(fileName);
			bw = new BufferedWriter(fw);
			// 写入文件
			for (int i = 0; i < InstanceNumber; i++) {
				bw.write(String.valueOf(data[i][FieldCount]).substring(0, 1));
				bw.newLine();
			}
			// 统计每类的数目，打印到控制台
			for (int i = 0; i < ClassCount; i++) {
				System.out.println("第" + (i + 1) + "类数目: "
						+ result.get(i).size());
			}
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			// 关闭资源
			if (bw != null)
				try {
					bw.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
			if (fw != null)
				try {
					fw.close();
				} catch (IOException e) {
					e.printStackTrace();
				}
		}
	}