i’m using a IDE netbeans to run a java testing program to load a file. The following code is to to that
public void actionPerformed(ActionEvent ae) {
Object source = ae.getSource();
if (source==carMenuItem) {
String filename = JOptionPane.showInputDialog("Please input the file name");
File file = new File(filename);
System.out.println(file.isFile());
}
}
}
but i’m using netbeans, where should i place the file in order to test the program successfully?
The simplest way to find out: