All pastes #572649 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-06-17 19:49 UTC
rendered paste body
          import java.io.*;
public class TestFiles {

public static void main(String[] args) {

     File textFile = new File("scores.txt");
               if (textFile.exists()) {
               	System.out.println("File alreasy exists.");
               } else {
               	try {
               		textFile.createNewFile();
               		System.out.println("New file created.");
               		} catch (IOException e) {
System.out.println("File could not be created.");
               			System.err.println("IOException: " + e.getMessage());
               		}
               		
               		
               	}
               } }