Skip to content

Instantly share code, notes, and snippets.

@nomuken
Created June 20, 2014 10:40
Show Gist options
  • Save nomuken/67bc6d20cbcc2d359ef1 to your computer and use it in GitHub Desktop.
Save nomuken/67bc6d20cbcc2d359ef1 to your computer and use it in GitHub Desktop.
FlagMaker.java
import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;
/**
* Created by nomuken on 14/06/20.
*/
public class FlagMaker {
public static void main(String[] args)throws IOException {
FileWriter fileWriter;
for (int count = 0; count < 5000; count++) {
fileWriter = new FileWriter("flags/file-"+count+".txt");
String line = "";
for(int i=0;i<99999;i++){
Random random = new Random();
char ch = (char)random.nextInt(100);
line += ch;
}
fileWriter.write(line);
line = "";
fileWriter.close();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment