Which one of the options gets the name of the parent directory file one ) string name= file.getparentname("file.txt");string name= (new file("file.txt")).getparent();string name = (new file("file.txt")).getparentname();string name= (new file("file.txt")).getparentfile();?
Answers
Answered by
0
24-Sep-2010 · getParentName(“file.txt”); B. String name= (new File(“file.txt”)).getParent(); C. String name = (new File(“file.txt”)). getParentName(); D. String name ...
Answered by
1
Answer: string name = (new file("file.txt")).getparent();
Explanation:
string name = (new file("file.txt")).getparent();
This is the correct format.
getparent() method returns the immediate parent of the file directory.
#SPJ2
Similar questions
English,
7 months ago
Math,
7 months ago
English,
1 year ago
Social Sciences,
1 year ago
Physics,
1 year ago