java - Paths.get()... in other words, If you follow the trail you get lost -


in code have instruction:

path p1 = paths.get("c:\\java\\"); 

being path interface, wondering get() doing inside. opened source code in path.class , here's found:

public static path get(string first, string... more) {     return filesystems.getdefault().getpath(first, more); } 

as can see there getpath() return path. opened filesystem.class see getpath , here's found time... abstract method:

public abstract path getpath(string first, string... more); 

how possible? code seems nothing , there abstract method can't see how it's run. can clarify this?

when call filesystems.getdefault() obtain implementation of filesystem (os dependant), have own implementation of getpath, return own implementation of path interface.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -