0

I am doing some Java homework and we are currently studying IO and files in java.

In the directions it asks for us to instantiate a filesystem class. However this doesn't seem possible without using the following syntax. How can I better understand this?

FileSystem fs = FileSystems.getDefault();

Thanks for any help.

David Graff
  • 141
  • 1
  • 4
  • 11
  • `FileSystem` is an abstract class, so you can't create one with `new`. – President James K. Polk Nov 24 '18 at 19:48
  • 1
    [Creational Design Patterns](https://www.baeldung.com/creational-design-patterns). See also [`Calendar.getInstance()`](https://docs.oracle.com/javase/7/docs/api/java/util/Calendar.html#getInstance()). Different classes do (and implement) different things. – Elliott Frisch Nov 24 '18 at 19:49

0 Answers0