What is the result?
A.
getName (0): C:\
subpath (0, 2): C:\education\report.txt
B.
getName(0): C:\
subpth(0, 2): C:\education
C.
getName(0): education
subpath (0, 2): education\institute
D.
getName(0): education
subpath(0, 2): education\institute\student
E.
getName(0): report.txt
subpath(0, 2): insritute\student
Explanation:
Example:
Path path = Paths.get(“C:\\home\\joe\\foo”);
getName(0)
-> home
subpath(0,2)
Reference: The Java Tutorial, Path Operations
C
C