jshell> File foo = new File("goblins") foo ==> goblins jshell> foo.exists() $2 ==> false jshell> foo.mkdir() $3 ==> true jshell> foo.exists() $4 ==> true jshell> foo.isDirectory() $5 ==> true jshell> foo.renameTo("quackery"); | Error: | incompatible types: java.lang.String cannot be converted to java.io.File | foo.renameTo("quackery"); | ^--------^ jshell> foo.renameTo(new File("quackery")); $6 ==> true jshell> ".".listFiles() | Error: | cannot find symbol | symbol: method listFiles() | ".".listFiles() | ^-----------^ jshell> (new File(".")).listFiles() $7 ==> File[9] { ./heffalump, ./ferret, ./quackery, ./bonobo, ./dingo, ./ShowRegular.java, ./carical, ./aardvark, ./elephant } jshell> (new File(".")).URI() | Error: | cannot find symbol | symbol: method URI() | (new File(".")).URI() | ^-----------------^ jshell> (new File(".")).toURI() $8 ==> file:/Users/morrison/20202021/T1/4240/javaFIOB/./ jshell>