All I need help with is testing whether the file is opened or not.
Here is what I have:
public static void main(String[] args) {
//Prompt user to input file name
SimpleIO.prompt("Enter File name: ");
String fileName = SimpleIO.readLine();
//Create file object
File file = new File (fileName);
//Check to see if file is opened
if (!file.exists()){
System.out.println("The file you entered either do not exist or the name is spelled wrong.\nProgram is now being terminated.\nGoodbye!");}
}