File yourFile = new File("score.txt");
yourFile.createNewFile(); // if file already exists will do nothing
FileOutputStream oFile = new FileOutputStream(yourFile, false);
String yourFile = "YourFile.txt";
String yourContent = "YourContent"
File tmpDir = new File(yourFile);
boolean exists = tmpDir.exists();
if(!exists) {
FileOutputStream fos = new FileOutputStream(yourFile);
fos.write(yourContent.getBytes());
fos.flush();
fos.close();
}