Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

getRootDirectories()

 
meeta gaur
Ranch Hand
Posts: 305
Notepad Tomcat Server Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


FileSystem is an abstract class and method getRootDirectories() is also an abstract method, so how it is executing ? where is it's implementation ?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The answer lies in the class of the object returned by FileSystems.getDefault() method. The javadoc of that method here http://docs.oracle.com/javase/7/docs/api/java/nio/file/FileSystems.html#getDefault%28%29 has more details. If you want to check which exact class is being used as the default, just do a:

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!