File yourFile = new File("score.txt"); yourFile.createNewFile(); // if file already exists will do nothing FileOutputStream oFile = new FileOutputStream(yourFile, false);