Here you can find the source of fileWriter(int startpt, int letter)
public static void fileWriter(int startpt, int letter)
//package com.java2s; //License from project: Open Source License import java.io.PrintWriter; import java.util.ArrayList; public class Main { public static void fileWriter(int startpt, int letter) { System.out.println("Start point: " + (char) startpt); System.out.println("End point: " + (char) 55203); String filename = (char) letter + ""; System.out.println("Writing to file: " + filename); ArrayList letters = lastLetterGen(startpt); try {//from www .jav a 2 s . co m PrintWriter pr = new PrintWriter(filename); for (int i = 0; i < letters.size(); i++) { pr.println(letters.get(i)); } pr.close(); } catch (Exception e) { e.printStackTrace(); System.out.println("No such file exists."); } } public static ArrayList<Character> lastLetterGen(int StartPoint) { int EndPoint = 55203; ArrayList<Character> blocks = new ArrayList<>(); blocks.add((char) StartPoint); int i = StartPoint; while (i < EndPoint) { i += 6; blocks.add((char) i); i += 22; blocks.add((char) i); } return blocks; } }