I am trying to use the getParent method of the File library. Here is the code I am working with, but I am getting a null string:
public class MyCode {
public static void main (String[] args) {
File f = new File("");
String name = f.getParent();
System.out.println(name);
}
}
This code prints "null" to the terminal. I am very confused.