I'm working with the File class for the first time and am a little confused.
I wrote this basic code to see if a file on my desktop could be detected:
public static void main(String[]args){
File test= new File("abc.pdf");
if(test.exists()==true){
System.out.println("got it!");
}
else{System.out.println("try again");}
}
I know I'm missing a big step since the program can't seem to detect it. Can anyone tell me what else I need to look up? Thanks.