Maybe I'm missing something, but in the first one you are defining a File object, and the second one a String. In the first you don't need the getFullPathName() but it'll work with it.
The first statement returns a string object, which is used by the File class constructor to create a File object.
The second one simply returns a string object.