单选题Which gets the name of the parent directory file “file.txt”?()AString name= File.getParentName(“file.txt”);BString name= (new File(“file.txt”)).getParent();CString name = (new File(“file.txt”)).getParentName();DString name= (new File(“file.txt”)).getPa
题目
单选题
Which gets the name of the parent directory file “file.txt”?()
A
String name= File.getParentName(“file.txt”);
B
String name= (new File(“file.txt”)).getParent();
C
String name = (new File(“file.txt”)).getParentName();